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