import math
from functools import reduce

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

N = int(input())
A_list = [int(_) for _ in input().split()]

is_pairwise = True
is_setwise = False

for i in range(len(A_list)):
    if i < N:
        if sum(map(lambda x:math.gcd(x, A_list[i]), A_list[i+1:N])) != len(A_list[i+1:N]):
            is_pairwise= False
            break
    if not is_pairwise:
        break

if is_pairwise:
    print('pairwise coprime')
else:
    if gcd(*A_list) == 1:
        is_setwise = True
    if is_setwise:
        print('setwise coprime')
    else:
        print('not coprime')