# https://cs.stackexchange.com/questions/93030/algorithm-for-checking-if-a-list-of-integers-is-pairwise-coprime

import math
n = int(input())
nums = list(map(int, input().split()))

gcd_ = nums[0]
for num in nums[1:]:
    gcd_ = math.gcd(gcd_, num)

if gcd_ >= 2:
    print('not coprime')
    exit()

mod = 10**9 + 7
lcm_ = nums[0]
product = nums[0]
for num in nums[1:]:
    lcm_ = num * lcm_ // math.gcd(num, lcm_)
    lcm_ %= mod
    product *= num
    product %= mod

if product == lcm_:
    print('pairwise coprime')
else:
    print('setwise coprime')
