from math import gcd
N = int(input())
a = list(map(int, input().split()))
ans = a[0]
flag = True
for i in range(1, N):
    ans = gcd(ans, a[i])
    if flag and ans != 1:  
      flag = False
      
if flag:
  print("pairwise coprime")
elif flag == False and ans == 1:
  print("setwise coprime")
else:
  print("not coprime")