using System;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Linq;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using System.Security.Policy;

class Program
{
    const string Yes = "Yes";
    const string No = "No";
    const char White = '.';
    const char Black = '#';
    const long Mod = 1000000007;

    static void Main(string[] args) {
        checked {
#if DEBUG
            MyDebugger.Test(process, "../TextFile1.txt");
            //TestCaseMaker.MakeTestCase1("../TextFile2.txt");
            //MyDebugger.Test(process, "../TextFile2.txt");
#else
            object ret = process(new StreamReader(Console.OpenStandardInput()));
            Console.WriteLine(ret);
#endif
        }
    }

    static object process(TextReader input) {
        var n = int.Parse(input.ReadLine());
        var aa = ToIntArray(input.ReadLine(), n);

        long y = aa[0];

        bool isPC = true;

        for(int i = 0; i < n; i++) {
            if(i != 0 && y > 1) y = Gcd(y, aa[i]);

            if (isPC) { 
                for(int j = i + 1; j < n; j++) {
                    var x = Gcd(aa[i], aa[j]);
                    if(x > 1) isPC = false;
                }
            }
        }

        if(y > 1) return "not coprime";
        if(isPC) return "pairwise coprime";
        return "setwise coprime";
    }

    static long Gcd(long m, long n) {
        //ユークリッド互除法
        if (m < n) { var t = m; m = n; n = t; }

        while (true) {
            var mod = m % n;
            if (mod == 0) return n;
            m = n;
            n = mod;
        }
    }

    static long[] ToIntArray(string strs, int n) {
        var ret = new long[n];
        var spl = strs.Split(' ');
        for (int i = 0; i < n; i++)
            ret[i] = long.Parse(spl[i]);
        return ret;
    }
}
