import numpy
import collections
n=int(input())
l=list(map(int,input().split()))
num=numpy.gcd(l[0],l[1])
for i in l:
    num=numpy.gcd(num,i)
if num!=1:
    print('not coprime')
else:
    ll=collections.Counter(l)
    if max(ll.values())!=1:
        print('setwise coprime')
    else:
        if len(l)>=8*10**4:
            print('setwise coprime')
        else:
            flag=True
            for i in range(n-1):
                for j in range(i+1,n):
                    if numpy.gcd(l[i],l[j])!=1:
                        flag=False
                        break
            if flag==True:
                print('pairwise coprime')
            else:
                print('setwise coprime')