# import math
import fractions
import functools

N = int(input())
A = list(map(int, input().split()))

def lcm(a, b):
    return a * b // fractions.gcd(a, b)

if functools.reduce(lcm, A) == functools.reduce(int.__mul__, A):
    print('pairwise coprime')
elif functools.reduce(fractions.gcd, A) == 1:
    print('setwise coprime')
else:
    print('not coprime')
