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())
    A = list(map(int, readline().split()))
    D = [False] * (10 ** 6 + 1)
    D[1] = True
    pairwise = True
    setwise = [0] * (10 ** 6 + 1)
    for a in A:
        for i in range(2, int(-(-a ** 0.5 // 1)) + 1):
            if a % i == 0:
                setwise[i] += 1
                if D[i]:
                    pairwise = False
                else:
                    D[i] = True
                while a % i == 0:
                    a //= i
        if a!= 1:
            setwise[a] += 1
            if D[a]:
                pairwise = False
            else:
                D[a] = True
    if pairwise:
        print('pairwise coprime')
    else:
        if max(setwise)<N:
            print('setwise coprime')
        else:
            print('not coprime')


if __name__ == '__main__':
    main()
