def abc177_e():
    n = int(input())
    A = list(map(int, input().split()))

    from math import gcd
    cumf = [1]*n
    cumr = [1]*n
    cumf[0] = A[0]
    cumr[-1] = A[-1]
    for i in range(1, n):
        cumf[i] = gcd(cumf[i-1], A[i])
    for i in range(n-2, -1, -1):
        cumr[i] = gcd(cumr[i+1], A[i])

    if cumr[0] > 1:
        return print('not coprime')

    def prime_factorize(n: int) -> list:
        ''' nの素因数分解 '''
        arr = []
        while n % 2 == 0:
            arr.append(2)
            n = n // 2
        f = 3
        while f * f <= n:
            if n % f == 0:
                arr.append(f)
                n = n // f
            else:
                f += 2
        if n != 1:
            arr.append(n)
        return set(arr)

    setwise = False
    #inf = 10**6 + 1
    inf = max(A)+1
    fac = [0]*inf
    for i in range(n-1, -1, -1):
        if A[i] == 1: break
        for p in prime_factorize(A[i]):
            if fac[p] == 1:
                setwise = True
                break
            fac[p] = 1
        if setwise: break
    ans = 'setwise coprime' if setwise else 'pairwise coprime'
    return print(ans)

if __name__ == '__main__':
    abc177_e()