def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

def main():
    N = int(input())
    A = list(map(int, input().split()))
    minA = min(A)
    maxA = max(A)


    d = 2
    is_pairwise = True
    cnt = 0
    for a in A:
        if a % d == 0:
            cnt += 1
        if cnt == 2:
            is_pairwise = False
            break

    if is_pairwise:
        for d in range(3, maxA+1, 2):
            cnt = 0
            for a in A:
                if a % d == 0:
                    cnt += 1
                if cnt == 2:
                    is_pairwise = False
                    break
            if not is_pairwise:
                break
        
        if is_pairwise:
            print('pairwise coprime')
            return



    div_min_A = make_divisors(minA)
    div_min_A
    # print(div_min_A)

    s_max = int(A[-1] ** 0.5) + 1

    is_setwise = True
    # 最小値の約数（1以外）で割れる数が何個あるか調べ、
    # 2個以上あるなら
    for d in div_min_A[1:]:
        cnt = 0
        d_is_setwise_div = True
        for a in A:
            if a % d != 0:
                d_is_setwise_div = False
                break
        if d_is_setwise_div:
            is_setwise = False
            break
    
    if is_setwise:
        print('setwise coprime')
    else:
        print('not coprime')

if __name__ == '__main__':
    main()