n = int(input())
m=list(map(int,input().split()))
import math
mod=10**12+7
s=m[n-1]
d=m[n-1]

r=0
for i in range(n-2,-1,-1):
    d=math.gcd(m[i],d)
    
    
    if math.gcd(s,m[i])>1:
        r=1
    s*=m[i]
    
    

    s%=mod

    
if d>1:
    print('not coprime')
elif r==1:
    print('setwise coprime')
else:
    print('pairwise coprime')

    