import math
N=int(input())
S=list(map(int,input().split()))
A=S[0]
B=1
Z=1
for i in range(N):
  A=math.gcd(A,S[i])
  if math.gcd(B,S[i])!=1:
    Z=0
  B*=S[i]
print("pairwise coprime" if Z==1 else "setwise coprime"if A==1 else "not coprime")