import math

N = int(input())
numbers = list(map(int, input().split()))

ans = 'pairwise coprime'
max_tmp = float('inf')
min_tmp = 0



for i in range(N - 1):
    tmp = math.gcd(numbers[i], numbers[i + 1])
    
    if (tmp > 1):
        max_tmp = max(tmp, max_tmp)
        min_tmp = min(tmp, min_tmp)

        
        if (max_tmp % min_tmp != 0):
            ans = 'setwise coprime'
        else:
            ans = 'not coprime'


print(ans)

