from sys import *
input=stdin.readline
from math import *
n=int(input())
l=list(map(int,input().split()))
l.sort()
g=l[0]
for i in range(1,n):
    g=gcd(g,l[i])
if(g!=1):
    print("not coprime")
else:
    f=0
    p=l[-1]
    c=0
    for i in l:
        if(i%2==0):
            c+=1
    if(c>=2):
        f=1
    for i in range(n-2,-1,-1):
        if(gcd(p,l[i])!=1):
            f=1
            break
        p*=l[i]
    if(f==1):
        print('setwise coprime')
    else:
        print('pairwise coprime')
