using static System.Math;
using static System.Console;
using System.Collections.Generic;
using System.Linq;
using System;

class Program
{
    #region Reader
    static string ReadStr => Console.ReadLine();
    static string[] ReadStrs => Console.ReadLine().Split(' ');
    static int ReadInt => Convert.ToInt32(Console.ReadLine().Trim());
    static int[] ReadInts => Console.ReadLine().Trim().Split(' ').Select(s => Convert.ToInt32(s)).ToArray();
    static long ReadLong => Convert.ToInt64(Console.ReadLine().Trim());
    static long[] ReadLongs => Console.ReadLine().Trim().Split(' ').Select(s => Convert.ToInt64(s)).ToArray();
    #endregion
    #region Method
    const int mod = 1000000007;
    public static int Mod(int a, int mod) { return a % mod >= 0 ? a % mod : a % mod + mod; }
    public static long Mod(long a, long mod = mod) { return a % mod >= 0 ? a % mod : a % mod + mod; }
    #endregion





    /// <summary>
    /// 最大公約数
    /// </summary>
    /// <param name="a"></param>
    /// <param name="b"></param>
    /// <returns></returns>
    public static long Gcd(long a, long b)
    {
        if (a < b)
            // 引数を入替えて自分を呼び出す
            return Gcd(b, a);
        while (b != 0)
        {
            var remainder = a % b;
            a = b;
            b = remainder;
        }
        return a;
    }



    public static Dictionary<int, int> PrimeFactors(int n)
    {
        int i = 2;
        int tmp = n;
        Dictionary<int, int> d = new Dictionary<int, int>();

        while (i * i <= n) //※1
        {
            if (tmp % i == 0)
            {
                tmp /= i;
                if (d.ContainsKey(i)) d[i]++;
                else d.Add(i, 1);
            }
            else
            {
                i++;
            }
        }
        if (tmp != 1)
        {
            if (d.ContainsKey(tmp)) d[tmp]++;
            else d.Add(tmp, 1);
        }
        return d;
    }

    static void Main()
    {
        int N = ReadInt;
        int[] As = ReadInts;

        long g = As[0];
        long max = As.Max();

        for (int i = 1; i < N; i++)
        {
            g = Gcd(g, As[i]);
        }

        if(g != 1)
        {
            WriteLine("not coprime");
            return;
        }


        bool[] ans = new bool[max+1];
        bool set = false;

        for (int i = 0; i < N; i++)
        {
            bool[] num = new bool[max + 1];

            var d = PrimeFactors(As[i]);

            foreach (var item in d)
            {
                long m = item.Key;
                long n = item.Key;

                while (n <= max)
                {
                    if (!num[n])
                    {
                        num[n] = true;
                    }
                    n += m;
                }


            }

            for (int j= 0; j < num.Length; j++)
            {
                if (!ans[j] && num[j]) ans[j] = true;
                else if (ans[j] && num[j])
                {
                    WriteLine("setwise coprime");
                    return;
                }
            }
          
        }
       WriteLine("pairwise coprime");
    }
}

