def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]


def main():
    n = int(input())
    al = list(map(int, input().split()))
    ps = primes(n)
    pset = set()

    no_flag = False
    for a in al:
        for p in ps:
            if a%p == 0:
                if p in pset:
                    no_flag = True
                    break
                else:
                    pset.add(p)
        if no_flag:
            break
    else:
        print('pairwise coprime')
        exit()

    pset = set()
    for p in ps:
        if al[0]%p == 0:
            pset.add(p)

    for a in al[1:]:
        apset = set()
        for p in ps:
            if a%p == 0:
                apset.add(p)
        pset = pset&apset
        if len(pset) == 0:
            print('setwise coprime')
            break
    else:
        print('not coprime')



if __name__ == "__main__":
    main()