n = int(input())
a = [int(_) for _ in input().split()]
p = [2]
a.sort()
for i in range(3, 10**3+100):
    for P in p:
        if i % P == 0:
            break
    else:
        p.append(i)

dic = {}
for P in p:
    dic[P] = 0

for i in range(n):
    if a[i] == 1:
        print("pairwise coprime")
        exit(0)
    temp = a[i]
    for P in p:
        if temp % P == 0:
            dic[P] += 1
            while temp % P == 0:
                temp //= P
        if temp == 1:
            break
    if temp != 1:
        if temp in dic.keys():
            dic[temp] += 1
        else:
            dic[temp] = 1

# print(ans[0:10])

ans = dic.values()
# print(ans)
# print(p, len(p))
# print(dic)
if max(ans) == n:
    print("not coprime")
elif max(ans) == 1:
    print("pairwise coprime")
else:
    print("setwise coprime")
