import math
from functools import reduce
k=10**6+1
def judge(n,a):
  c=[0]**k
  for x in a:
    c[x]=+1
  t=any(sum(c[i::i])>1 for i in range(2,k))
  t+=reduce(gcd,a)>1
  return ['pairwise','setwise','not'][t]+' coprime'
n=int(input())
a=list(map(int,input().split()))
print(judge(n,a))