import math
from functools import reduce

import sys

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

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


N = int(input())
AList = list(map(int, input().split()))

if gcd_list(AList) == 1:
    for p in range(len(AList)):
        for q in range(p + 1, len(AList)):
            if math.gcd(AList[p], AList[q]) != 1:
                print('setwise coprime')
                sys.exit()
    print('pairwise coprime')
else:
    print('not coprime')