from collections import Counter

def prime(n):
    res = set()

    if not n % 2:
        res.add(2)
        while not n % 2:
            n //= 2

    i = 3

    while pow(i, 2) <= n:
        if not n % i:
            res.add(i)
            while not n % i:
                n //= i
        i += 2

    if n > 1: res.add(n)

    return res

def main():
    N = int(input())
    A = list(map(int, input().split()))
    cnt = Counter()
    
    for a in A:
        res = prime(a)
        
        for r in res:
            cnt[r] += 1
            
    for c in cnt.values():
        if c == N:
            print('not coprime')
            return
        elif c > 1:
            print('setwise coprime')
            return
            
    print('pairwise coprime')

if __name__ == '__main__':
    main()
