import math

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

ans = a[0]
A = []

for x in a[1:]:
    ans = math.gcd(ans,x)
    A.append(ans)
#print(ans)
#print(A)

if A.count(1) == len(A):
    print('pairwise coprime')
elif A.count(1) != len(A) and ans == 1:
    print('setwise coprime')
else:
    print('not coprime')