import math
from functools import reduce

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

n = int(input())
a = list(map(int, input().split()))

flg = True
for i in range(n-1):
    for j in range(i+1, n):
        if math.gcd(a[i], a[j]) != 1:
            if i != 0:
                a = a[i-1:]
            flg = False
            break
    if flg:
        print('pairwise coprime')
        exit()

if gcd_list(a) == 1:
    print('setwise coprime')
else:
    print('not coprime')
