n = int(input())
As = list(map(int, input().split()))

import fractions
from functools import reduce

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

gcds = set()

for j in range(1, n):
    for i in range(j):
        if fractions.gcd(As[i],As[j]) != 1:
            gcds.add(fractions.gcd(As[i],As[j]))
if len(gcds) != 0:
    if gcd(*gcds) == 1:
        print("setwise coprime")
    else:
        print("not coprime")
else:
    print("pairwise coprime")