from math import gcd
n = int(input())
a = list(map(int, input().split()))
maxn = 10 ** 6 + 1
numl = [0] * maxn
flag = 0
for i in a:
    for j in range(2, maxn):
        if(j*j > i):
            if(numl[i] == 0):
                numl[i]+=1
            else:
                flag = 1
            break
        if(i % j == 0):
            if(numl[j] == 0):
                numl[j]+=1
            else:
                flag = 1
                break
    if(flag == 1):
        ans = a[0]
        for k in range(1, n):
            ans = gcd(ans, a[k])
        if(ans == 1):
            print("setwise coprime")
        else:
            print("not coprime")
        break
else:
    print("pairwise coprime")
