from math import gcd
import numpy as np

n = int(input())
a = list(map(int, input().split()))
MAX = 10 ** 6

g = a[0]
for e in a:
    g = gcd(g, e)

if g != 1:
    print("not coprime")
    exit()

nums = np.zeros(MAX + 1, np.int64)
for e in a:
    nums[e] += 1
for i in range(2, MAX + 1):
    if nums[i::i].sum() > 1:
        print("setwise coprime")
        exit()

print("pairwise coprime")

