#dt = {} for i in x: dt[i] = dt.get(i,0)+1
import sys;input = sys.stdin.readline
inp,ip = lambda :int(input()),lambda :[int(w) for w in input().split()]

from fractions import gcd
n = inp()
x = ip()
ans = 'pairwise coprime'
prev = x[0]
for i in range(1,n):
    t = gcd(prev,x[i])
    #print(t)
    prev = t
    if t != 1:
        ans = 'setwise coprime'
if t != 1:
    ans = 'not coprime'
print(ans)
