from math import gcd
N = int(input())
a = list(map(int, input().split()))
ans = a[0]
flag = True

for i in range(N):
  if i != 0:
    ans = gcd(ans,a[i])
  for j in range(i+1,N):
    if gcd(a[i],a[j]) != 1:
      flag = False
  
if flag:
  print("pairwise coprime")
  exit()     
elif flag == False and ans == 1:
  print("setwise coprime")
elif ans != 1:
  print("not coprime")