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

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

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

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