import math
from functools import reduce

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

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

N = int(input())
A_list = list(map(int, input().split()))
A_list_min = sorted(A_list)

if gcd(*A_list) != 1:
    print("not coprime")
else:
    for i in range(len(A_list)):
        for j in range(i+1, len(A_list)):
            if gcd(A_list[i], A_list[j]) != 1:
                print("setwise coprime")
                exit()
    print("pairwise coprime")

