import math
import functools

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

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

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