import math
n=int(input())
l=list(map(int,input().split()))
su=1
for values in l:
    su=su*values
lcm=1
gcc=l[0]
for values in l:
    gc=math.gcd(lcm,values)
    gcc=math.gcd(gcc,values)
    lcm=(lcm*values)//gc;
# print(gcc)
# print(lcm)
# print(su)
if lcm==su and gcc==1:
    print("pairwise coprime")
elif lcm!=su and gcc==1:
    print("setwise coprime")
else:
    print("not coprime")
