#!/usr/bin/env python3
import collections


def make_divisors(n):
    lower_divisors, upper_divisors = [], []
    i = 1
    while i * i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n // i)
        i += 1
    return lower_divisors + upper_divisors[::-1]


def main():
    n = int(input())
    a = list(map(int, input().split()))
    num = [0] * (10**6 + 1)
    for i in range(n):
        d = make_divisors(a[i])
        for j in range(len(d)):
            num[d[j]] += 1

    cnt = collections.Counter(num)
    if cnt[n] > 1:
        ans = 'not coprime'
    elif len(cnt) == 3:
        ans = 'pairwise coprime'
    else:
        ans = 'setwise coprime'

    print(ans)


if __name__ == "__main__":
    main()
