# -*- coding: utf-8 -*-
"""
@author: H_Hoshigi
"""

import math

def erastosthenes(N):
    number_list = [i for i in range(N+1)]
    is_p_list = [True]*(N+1)

    is_p_list[0] = False
    is_p_list[1] = False

    for i in range(2, math.ceil(math.sqrt(N+1))):
        if is_p_list[i]:
            for j in range(2, (N//i)+1):
                is_p_list[i*j] = False
    return [number for number in number_list if is_p_list[number]]

def main():
    N = int(input())
    A_lsit = list(map(int, input().split()))
    A_lsit.sort()

    p_list = erastosthenes(1000000)

    min_counter = 0
    for p in p_list:
        counter = 0
        for A in A_lsit:
            if A%p != 0:
                counter += 1
        min_counter = min(min_counter, counter)
    
    if min_counter >= N-1:
        print("pairwise coprime")
    elif min_counter >= 1:
        print("setwise coprime")
    else:
        print("not coprime")

if __name__ == "__main__":
    main()

