import sys
from math import gcd
stdin = sys.stdin

n = int(input())
an = list(map(int, stdin.readline().split()))
bn = []

for i in range(n-1):
    for j in range(i+1, n):
        s = gcd(an[i], an[j])
        if s != 1:
            bn.append(s)

if not bn:
    print('pairwise coprime')
    exit(0)


for i in range(n-1):
    for j in range(i+1, n):
        s = gcd(an[i], an[j])
        if s != 1:
            print('not coprime')
            exit(0)
            break

print('setwise coprime')