import math
f=0
n=int(input())
a=list(map(int,input().split()))
p = [0]*10**6
for i in range(0, len(a)):
    for j in range(2, int(math.sqrt(a[i]))+2):
        if a[i] % j == 0:
            p[i] += 1
        if p[i]==2:
            f=1
            break
    if f==1:
        break
if f==0:
    print("pairwise coprime")
else:
    _gcd=a[0]
    for i  in range(1,len(a)):
        _gcd=math.gcd(_gcd,a[i])
    if _gcd==1:
        print("setwise coprime")
    else:
        print("not coprime")
    