import math
n = int(input())
a = list(map(int,input().split()))
x = True
for i in range(n - 1):
    for j in range(i + 1,n):
        if math.gcd(a[i],a[j]) != 1:
            break
    else:
        continue
    break
else:
    print("pairwise coprime")
    x = False
if x:
    ans = a[0]
    for i in range(1,n):
        ans = math.gcd(ans,a[i])
    if ans == 1:
        print("setwise coprime")
        x = False
if x:
    print("not coprime")