import math
m=int(input())
a,b,c=map(int,input().split())
a1=math.gcd(a,b)
a2=math.gcd(a,c)
a3=math.gcd(b,c)
if a1==1 and a2==1 and a3==1:
    print("pairwise coprime")
elif a1==2 and a2==2 and a3==2:
    print("not coprime")
else:
    print("setwise coprime")










