import math
from functools import reduce

def gcd(num_list):
    return reduce(math.gcd, num_list)

n = int(input())
a = list(map(int, input().split()))
pc = True
cnt = 0

while pc:
    if cnt == n:
        break
    i = a.pop()
    for j in a:
        if math.gcd(i, j) == 1:
            pc = True
        else:
            pc = False
            break
    a.append(i)
    cnt += 1

if pc:
    print("pairwise coprime")
    exit()

if gcd(a) == 1:
    print("setwise coprime")
    exit()

else:
    print("not coprime")