import sys
read = sys.stdin.read
readlines = sys.stdin.readlines
from collections import defaultdict
def main():
    n, *a = map(int, read().split())

    def factorization(n):
        arr = []
        temp = n
        for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
            if temp % i == 0:
                cnt = 0
                while temp % i == 0:
                    cnt += 1
                    temp //= i
                arr.append([i, cnt])
        if temp != 1:
            arr.append([temp, 1])
        if arr == []:
            arr.append([n, 1])
        return arr

    d1 = defaultdict(int)
    for ae in a:
        t1 = factorization(ae)
        for t1e in t1:
            d1[t1e[0]] += 1

    d1v = d1.values()
    if max(d1v) == n:
        print('not coprime')
    elif all([i == 1 for i in d1v]):
        print('pairwise coprime')
    else:
        print('setwise coprime')


if __name__ == '__main__':
    main()
