from math import *
n = int(input())
a = list(map(int,input().split()))
g = 0
for i in range(n):
    g = gcd(g,a[i])
    
if g == 1:
    a = list(set(a))
    a = sorted(a)
    m = len(a)
    
    if m != n:
        print("setwise coprime")
        
    else:
    
        b = [True]*(10**6+1)

        for i in range(m):
            b[a[i]] = False

        sw = 1
        
        for i in range(2, 5*10**5+1):
            q = 0
            j = 1
            while i*j <= 10**6:
                if b[i*j] == False:
                    q += 1
                j += 1
            if q >= 2:
                sw = 0
                break

        if sw == 0:
            print("setwise coprime")
        else:
            print("pairwise coprime")
        
else:
    print("not coprime")