import math
import sys
input = sys.stdin.readline

N = int(input())
A = list(map(int, input().split()))
Nums = [0]*(10**6 + 1)

for a in A:
  Nums[a] += 1

GCD = A[0]
for i in range(N-1):
  GCD = math.gcd(GCD, A[i+1])

if GCD != 1:
  print("not coprime")
else:
  for d in range(2, 10**6+1):
    cnt = sum(Nums[d::d])
    if cnt > 1:
      print("setwise coprime")
      exit()
  print("pairwise coprime")