import sys

sys.setrecursionlimit(500005)
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
a = na()

f = [0] * 1000001
for v in a:
    f[v] += 1
for i in range(500000, 1, -1):
    for j in range(i*2, 1000001, i):
        f[i] += f[j]

def gcd(a, b):
    while b > 0:
        c = a % b
        a = b
        b = c
    return a

if max(f[2:]) <= 1:
    print("pairwise coprime")
else:
    x = 0
    for v in a:
        x = gcd(x, v)
    if x == 1:
        print("setwise coprime")
    else:
        print("not coprime")
