from math import gcd
from functools import reduce
N = int(input())
*A, = map(int, input().split())
mod = 10**9 + 7
mod2 = 2147483647

def lcm(a, b):
    return a*b//gcd(a,b) % mod

def mul(a, b):
    return a*b % mod

def lcm2(a, b):
    return a*b//gcd(a,b) % mod2

def mul2(a, b):
    return a*b % mod2

if reduce(lcm, A) == reduce(mul, A) and reduce(mul2, A) == reduce(lcm2, A):
    print('pairwise coprime')
elif reduce(gcd, A) == 1:
    print("setwise coprime")
else:
    print('not coprime')
