import math
from functools import reduce

N  = int(input())
a = list(map(int,input().split()))
temp = 0


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

for i in range(N):
    for l in range(N):
        if a[i] % a[l] != 1:
            temp += 1
if temp == 0:
    print('pairwise coprime')
elif gcd_list(a) == 1:
    print('setwise coprime')
else:
    print('not coprime')