using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
namespace Atcoder_0404
{
    class Program
    {
        static void Main(string[] args)
        {
            string pariwise = "pairwise coprime";
            string setwise = "setwise coprime";
            string not = "not coprime";
            

            var N = GetInput_long()[0];
            var A_n = GetInput_long();
            Array.Sort(A_n);
            //ペアワイズの調査
            //最大値以下の素数を用意
            List<long> sosuuList = new List<long>();
            var max = A_n[A_n.Length - 1];
            for(int i = 2; i * i < max; i++)
            {
                sosuuList.Add(i);
            }
            bool[] sosuuChecked = new bool[sosuuList.Count+2];

            sosuuList = new List<long>();
            for (int i = 0; i < sosuuChecked.Length; i++) sosuuChecked[i] = false;
            for (int i = 2; i * i < max; i++)
            {
                if (sosuuChecked[i]) continue;
                sosuuChecked[i] = true;
                sosuuList.Add(i);
                for (int j = i + i; j < sosuuChecked.Length; j += i)
                {
                    sosuuChecked[j] = true;
                }
            }

            //ここから調査
            bool isPairWise = true;
            bool[] isSosuUsed = new bool[sosuuList.Count];
            for (int i = 0; i < isSosuUsed.Length; i++) isSosuUsed[i] = false;
            for(int i = 0; i < A_n.Length; i++)
            {
                bool isend = false;
                for(int j = 0; j < sosuuList.Count; j++)
                {
                    var targetSosuu = sosuuList[j];
                    if (targetSosuu * targetSosuu > A_n[i]) break;
                    if (A_n[i] % sosuuList[j] == 0)
                    {
                        if (isSosuUsed[j])
                        {
                            isend = true;
                            break;
                        }
                        isSosuUsed[j] = true;
                    }
                }
                if (isend)
                {
                    isPairWise = false;
                    break;
                }
            }
            
            //セットワイズの調査
            //GCDの重さによってはアウト？
            var nowNum = A_n[0];
            for(int i = 1; i < N; i++)
            {
                nowNum=GCD(nowNum, A_n[i]);
            }

            if (isPairWise)
            {
                Console.WriteLine(pariwise);
            }else if (nowNum == 1)
            {
                Console.WriteLine(setwise);
            }
            else
            {
                Console.WriteLine(not);
            }
        }
        #region input


        static string[] GetInput_string()
        {
            var input = Console.ReadLine().Split(' ');
            return input;
        }

        static int[] GetInput_int()
        {
            var input = GetInput_string();
            var result = new int[input.Length];
            for (int i = 0; i < result.Length; i++)
            {
                result[i] = int.Parse(input[i]);
            }
            return result;
        }
        static long[] GetInput_long()
        {
            var input = GetInput_string();
            var result = new long[input.Length];
            for (int i = 0; i < result.Length; i++)
            {
                result[i] = long.Parse(input[i]);
            }
            return result;
        }
        #endregion
        #region sonota
        static void Swap_array<T>(T[] target, int a, int b)
        {
            T temp = target[a];
            target[a] = target[b];
            target[b] = temp;
        }
        static void Swap_list<T>(List<T> target, int a, int b)
        {
            T temp = target[a];
            target[a] = target[b];
            target[b] = temp;
        }
        /// <summary>
        /// 最大公約数
        /// </summary>
        public static int GCD(int a, int b)
        {

            /* 自然数 a > b を確認・入替 */
            if (a < b)
            {
                int tmp = a;
                a = b;
                b = tmp;
            }

            /* ユークリッドの互除法 */
            int r = a % b;
            while (r != 0)
            {
                a = b;
                b = r;
                r = a % b;
            }
            return b;
        }
        public static long GCD(long a, long b)
        {

            /* 自然数 a > b を確認・入替 */
            if (a < b)
            {
                long tmp = a;
                a = b;
                b = tmp;
            }

            /* ユークリッドの互除法 */
            long r = a % b;
            while (r != 0)
            {
                a = b;
                b = r;
                r = a % b;
            }
            return b;
        }

        /// <summary>
        /// 最小公倍数
        /// </summary>
        public static int LCM(int a, int b)
        {
            int x = a * b;
            b = GCD(a, b);
            return x / b;

        }
        #endregion
        
    }
}