import numpy as np

n=int(input())
a=list(map(int,input().split()))

if np.lcm.reduce(a)==np.prod(a):
    print("pairwise coprime")
elif np.gcd.reduce(a)==1:
    print("setwise coprime")
else:
    print("not coprime")
