from collections import defaultdict
import math
def calc_divisors(n):
    divisors = []
    for i in range(2,int(math.sqrt(n)+1)):
        if n % i == 0:
            divisors.append(i)
            if (i*i != n):
                divisors.append(n//i)

    return divisors

def solve():
    N = int(input())
    A = list(map(int,input().split()))
    divisors_counter = defaultdict(int)

    is_pairwise = True
    for a in A:
        divisors = calc_divisors(a)
        for d in divisors:
            if divisors_counter[d] != 0:
                is_pairwise = False
            divisors_counter[d] += 1
    
    if is_pairwise:
        print('pairwise coprime')
        return
    
    if list(divisors_counter.values()).count(N) == 0:
        print('setwise coprime')
    else:
        print('not coprime')
        
if __name__ == '__main__':
    solve()
