n = int(input())
m=list(map(int,input().split()))
import math
mod=10**9+7
s=m[n-1]
d=m[n-1]
k=m[n-1]
for i in range(n-2,-1,-1):
    d=math.gcd(m[i],d)
    s*=m[i]
    k=m[i]*k//d
    k%=mod
    s%=mod
if d>1:
    print('not coprime')
elif s!=k:
    print('setwise coprime')
else:
    print('pairwise coprime')

    