from math import gcd
from functools import reduce

def lcm(a, b):
    div = pow(gcd(a, b), p - 2, p)
    return (a * b * div) % p

def lcm_list(A):
    return reduce(lcm, A)

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

def mul_mod(a, b):
    return a * b % p

n = int(input())
a = [int(x) for x in input().split()]
p = 10 ** 9 + 7

if gcd_list(a) == 1:  # setwise coprime or pairwise coprime
    prod_a = reduce(mul_mod, a)
    lcm_a = lcm_list(a)
    if prod_a == lcm_a:
        print('pairwise coprime')
    else:
        print('setwise coprime')
else:
    print('not coprime')