import numpy as np
N=int(input())
A=list(map(int,input().split()))
flag1=True
flag2=True
for i in range(N-1):
    for j in range(i+1,N):
        if np.gcd(A[i],A[j])!=1:
            flag1=False
            break
    else:
        continue
    break
if not flag1:
  if np.gcd.reduce(A)!=1:
    flag2=False
if flag1:
    print('pairwise coprime')
elif flag2:
    print('setwise coprime')
else:
    print('not coprime')