import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)
def gcd_list(numbers):
    return reduce(math.gcd, numbers)
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

N = int(input())
A = [int(i) for i in input().split()]

flag = True
LCM = A[-1]
for i in range(N - 2, -1, -1):
    if gcd(A[i], LCM) != 1:
        flag = False
        break

    LCM = lcm_base(LCM, A[i])

if flag:
    print("pairwise coprime")
else:
    if gcd_list(A) == 1:
        print("setwise coprime")
    else:
        print("not coprime")