# E - Coprime
from math import gcd
from functools import reduce

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

def lcm(x, y):
    return (x * y) // gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm, numbers, 1)

N = int(input())
A = list(map(int,input().split()))
seki = 1
for a in A:
    seki *= a
if lcm_list(A)==seki:
    print('pairwise coprime')
elif gcd_list(A)==1:
    print('setwise coprime')
else:
    print('not coprime')