import os
import heapq
import sys, threading
import math
import operator
from collections import defaultdict, deque
from io import BytesIO, IOBase
import math as mt

sys.setrecursionlimit(10 ** 5)
threading.stack_size(2 ** 27)


def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a % b)


"""def pw(a,b):
    result=1
    while(b>0):
        if(b%2==1): result*=a
        a*=a
        b//=2
    return result"""


def inpt():
    return [int(k) for k in input().split()]


def main():
    MAXN = 1000001
    prime = [0] * MAXN
    prime[1] = 1
    for i in range(2, MAXN):
        prime[i] = i

    for i in range(4, MAXN, 2):
        prime[i] = 2

    for i in range(3, mt.ceil(mt.sqrt(MAXN))):
        if (prime[i] == i):
            for j in range(i * i, MAXN, i):
                if (prime[j] == j):
                    prime[j] = i
    n = int(input())
    ar = inpt()
    d = defaultdict(set)
    ok = True
    for i in ar:
        x = i
        while (x != 1):
            tp = prime[x]
            x = x // prime[x]
            d[tp].add(i)

    for i in d.keys():
        if (len(d[i]) > 1):
            ok = False
            break

    if (ok):
        print('pairwise coprime')
        exit()

    gcd = ar[0]
    for i in range(1, n):
        gcd = mt.gcd(gcd, ar[i])

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