#!/usr/bin/env python3
import sys
import collections

def main():
    def factorization(n):
        arr = []
        temp = n
        for i in range(2, int(-(-n**0.5//1))+1):
            if temp%i==0:
                cnt=0
                while temp%i==0:
                    cnt+=1
                    temp //= i
                arr.append(i)

        if temp!=1:
            arr.append(temp)

        if arr==[]:
            arr.append(n)

        return arr

    input = sys.stdin.readline
    n = int(input())
    a = list(map(int, input().split()))
    cnt = collections.defaultdict(int)
    for i in a:
        for fact in factorization(i):
            cnt[fact] += 1

    flag = False
    for i in dict(cnt).values():
        if i == n:
            print("not coprime")
            exit()
        if i != 1:
            flag = True
            break
    
    if flag:
        print("setwise coprime")
    else:
        print("pairwise coprime")


    


if __name__ == '__main__':
    main()
