import math
from functools import reduce

n = int(input())
a = list(map(int, input().split()))

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

ch = gcd_list(a)
if ch != 1:
    print("not coprime")
else:
    check = 0
    s = a[0]
    for i in range(1, n):
        if s % a[i] == 0:
            check += 1
            break
        else:
            s *= a[i]
    if check == 0:
        print("pairwise coprime")
    else:
        print("setwise coprime")