import numpy as np
from numba import njit

n = int(input())
arr = np.array(list(map(int, input().split())))


@njit
def solve(arr):
    ans = True
    x = arr[0]
    for i in range(1, arr.shape[0]):
        g = np.gcd(x, arr[i])
        if g != 1:
            ans = False
            break
        x = x * arr[i] // g
    return ans


ans1 = solve(arr)
ans2 = np.gcd.reduce(arr) == 1

if ans1 and ans2:
    print("pairwise coprime")
elif ans2:
    print("setwise coprime")
else:
    print("not coprime")