import numpy as np



N = int(eval(input()))

A = list(map(int, input().split()))

exist = [0] * (10**6 + 1)

for a in A:

    exist[a] += 1



if np.gcd.reduce(A) != 1:

    print('not coprime')

elif np.all([sum(exist[i::i]) <= 1 for i in range(2, 10**6+1)]):

    print('pairwise coprime')

else:

    print('setwise coprime')
from math import gcd



N = int(eval(input()))

A = list(map(int, input().split()))

exist = [0] * (10**6 + 1)

for a in A:

    exist[a] += 1



g = A[0]

for a in A[1:]:

    g = gcd(g, a)



if g != 1:

    print('not coprime')

elif all([sum(exist[i::i]) <= 1 for i in range(2, 10**6+1)]):

    print('pairwise coprime')

else:

    print('setwise coprime')
import numpy as np

N = int(eval(input()))
A = list(map(int, input().split()))
exist = [0] * (10**6 + 1)
for a in A:
    exist[a] += 1
if np.gcd.reduce(A) != 1:
    print("not coprime")
elif np.all([sum(exist[i::i]) <= 1 for i in range(2, 10**6 + 1)]):
    print("pairwise coprime")
else:
    print("setwise coprime")

from math import gcd

N = int(eval(input()))
A = list(map(int, input().split()))
exist = [0] * (10**6 + 1)
for a in A:
    exist[a] += 1
g = A[0]
for a in A[1:]:
    g = gcd(g, a)
if g != 1:
    print("not coprime")
elif all([sum(exist[i::i]) <= 1 for i in range(2, 10**6 + 1)]):
    print("pairwise coprime")
else:
    print("setwise coprime")

-import numpy as np +from math import gcd -if np.gcd.reduce(A) != 1: +g = A[0] +for a in A[1:]: +    g = gcd(g, a) +if g != 1: -elif np.all([sum(exist[i::i]) <= 1 for i in range(2, 10**6 + 1)]): +elif all([sum(exist[i::i]) <= 1 for i in range(2, 10**6 + 1)]):