import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N = int(readline())
    if N>78499:
        print('pairwise coprime')
        sys.exit()
    A = list(map(int, readline().split()))
    D = [False] * (10 ** 6 + 1)
    D[1] = True
    pairwise = True

    setwise = set()
    tmp = A[0]
    for i in range(2, int(-(-tmp ** 0.5 // 1)) + 1):
        if tmp % i == 0:
            setwise.add(i)
            while tmp % i == 0:
                tmp //= i
    if tmp != 1:
        setwise.add(tmp)

    for a in A[1:]:
        tmp = set()
        for i in range(2, int(-(-a ** 0.5 // 1)) + 1):
            if a % i == 0:
                tmp.add(i)
                if D[i]:
                    pairwise = False
                else:
                    D[i] = True
                while a % i == 0:
                    a //= i
        if a != 1:
            tmp.add(a)
            if D[a]:
                pairwise = False
            else:
                D[a] = True
        setwise &= tmp
        if setwise or pairwise:
            continue
        else:
            break
    if pairwise:
        print('pairwise coprime')
    else:
        if setwise:
            print('not coprime')
        else:
            print('setwise coprime')


if __name__ == '__main__':
    main()
