import math, sys
from functools import reduce

def gcd_set(n):
    return reduce(math.gcd, n)

N = int(input())
A = set(map(int, input().split()))
for a in A:
    for b in A:
        if a == b:
            continue
        if math.gcd(a, b) != 1:
            if gcd_set(A) == 1:
                print('setwise coprime')
            else:
                print('not coprime')
            sys.exit()
print('pairwise coprime')