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')
    setwise = False
    for i in range(1, n-1):
        fr = gcd(cumf[i-1], cumr[i+1])
        if fr > 1:
            setwise = True
            break
    ans = 'setwise coprime' if setwise else 'pairwise coprime'
    return print(ans)

if __name__ == '__main__':
    abc177_e()