import math
N=int(input())
A=list(map(int,input().split()))
ans1 = A[0]
ans2 = 1
for i in range(1, N):
    ans1 = math.gcd(ans1, A[i])
    if (ans1 > 1):
        ans2 = 2

if ans1==1:
    if ans2==1:
        print('pairwise coprime')
    else:
        print('setwise coprime')
else:
    print('not coprime')
