import math
from functools import reduce

n = int(input())
a_list = list(map(int, input().split()))
prime_list = [0] * math.floor(a_list[n - 1] ** 0.5)

def is_coprime(num):
    for i in range(2, math.ceil(num ** 0.5)):
        if num % i == 0:
            if prime_list[i] == 1:
                return True
            else:
                prime_list[i] += 1
    return False

for i in range(n):
    if is_coprime(a_list[i]):
        if reduce(math.gcd, a_list) == 1:
            print("setwise coprime")
            exit()
        else:
            print("not coprime")
            exit()
print("pairwise coprime")
