import sys
from math import gcd
input=sys.stdin.readline
#sys.setrecursionlimit(10**6)
from numba import njit

@njit
def Ed(num,ycnt):
    for i in range(1,int(num**0.5)+1):
        if num%i==0:
            ycnt[i]+=1
            if num//i!=i:
                ycnt[num//i]+=1

def main():
    input()
    a=[int(i) for i in input().split()]

    N=10**6+1
    ycnt=[0]*N
    gsum=a[0]

    for i in a:
        gsum=gcd(gsum,i)
        Ed(i,ycnt)
    
    for i in range(N):
        if ycnt[i]>=2 and i!=1:
            break
    else:
        print("pairwise coprime")
        exit()
    if gsum==1:
        print("setwise coprime")
    else:print("not coprime")

if __name__=="__main__":main()