from math import gcd
import itertools
from functools import reduce

def gcd_list(numbers):
    return reduce(gcd, numbers)

n = int(input())
a = list(map(int, input().split()))
res = 1
for x in itertools.combinations(a, 2):
    res = max(res, gcd(x[0], x[1]))
    if res > 1:
        break
if res == 1:
    print('pairwise coprime')
elif gcd_list(a) == 1:
    print('setwise coprime')
else:
    print('not coprime')