import sys
import numpy as np
sys = sys.stdin.buffer.readline
N = int(input())
A = np.array(list(map(int, input().split())))


def gcd(a, b):
    return a if b == 0 else gcd(b, a % b)


v = A[0]
for a in A:
    v = gcd(v, a)

for d in range(2, max(A)):
    if np.count_nonzero(A % d == 0) >= 2:
        if v == 1:
            print('setwise coprime')
        else:
            print('not coprime')
        exit()
print('pairwise coprime')
