import sys, math
from functools import lru_cache
import numpy as np
sys.setrecursionlimit(10**9)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]


def lcm(a, b):
    return a*b//math.gcd(a, b)


def main():
    N = ii()
    A = np.array(list(mi()))

    l = 1
    p = 1
    for a in A:
        l = np.lcm(l, a)
        p *= a
        l %= MOD
        p %= MOD

    g = np.gcd.reduce(A)

    if g > 1:
        print('not coprime')
    elif l == p:
        print('pairwise coprime')
    else:
        print('setwise coprime')

if __name__ == '__main__':
    main()
