import math

def eratosthenes():
    cnt = dict()
    lim = int(math.sqrt(max(set_a)))
    for i in range(2, lim+1):
        for res in range(i, max(set_a)+1, i):
            if res in set_a:
                cnt[res] = cnt.get(res, 0) + 1
    return cnt


n = int(input())
a = [int(x) for x in input().split()]
set_a = set(a)

ans = eratosthenes()

if max(ans.values()) == 1 and len(set_a) == n:
    print('pairwise coprime')
else:
    res = a[0]
    for i in range(n):
        res = math.gcd(res, a[i])
    if res == 1:
        print('setwise coprime')
    else:
        print('not coprime')