import math
from functools import reduce


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


n = int(input())
a = list(map(int, input().split()))
for i in range(n - 1):
    for j in range(i + 1, n):
        if math.gcd(a[i], a[j]) != 1:
            if gcd(a) == 1: print("setwise coprime")
            else: print("not coprime")
            exit()
else:
    print("pairwise coprime")