import numpy as np
import math
from functools import reduce
from copy import deepcopy

INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))

def primeNumberCreate():
    primeList = [2]  # 2以下の素数リストを作成
    maxNumber = 1000 # 1000以下の数字をチェック
    for x in range(3, maxNumber):
        for y in primeList:
            if x % y == 0:
                break
        else:
            primeList.append(x)  # 割り切れるものがなければリストに追加
    return primeList


def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

def do():
    prime=np.array(primeNumberCreate())
    n=INT()
    A=np.array(LIST())
    temp=gcd_list(A)

    if temp!=1:
        print("not coprime")
    else:
        flg=True
        for i in prime:
            B=deepcopy(A)
            if sum((B//i)*i)-sum(B)+n>=2:
                #print(sum(B)-sum((B//i)*i))
                flg=False
                break
                
        if flg:
            print("pairwise coprime")
        else:
            print("setwise coprime")



    
    
if __name__=='__main__':
    do()