using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Diagnostics.Tracing;

namespace Main
{
    class Program
    {
        static void Main(string[] args)
        {
            //ここから
            //int n=ReadInt();
            //string[] str = Console.ReadLine().Split(' ');
            int n = ReadInt();
            int[] a = ReadArray(n);
            bool isP = true;

            int max = a.Max();

            //zentai gcd
            int Gcd = gcd(a[0], a[1]);
            for (int i = 2; i < n; i++)
            {
                Gcd = gcd(Gcd, a[i]);
                if (Gcd == 1) break;
            }

            if (Gcd != 1)
            {
                Cout("not coprime");
                return;
            }

            int count = 0;
            for (int i = 0; i < n; i++)
            {
                if (a[i] % 2 == 0) count++;
            }

            if (count > 1) isP = false;

            for (int j = 3; j <= max; j += 2)
            {
                if (!isP) break;
                if (j != 3 && j % 3 == 0) continue;
                if (j != 5 && j % 5 == 0) continue;
                if (j != 7 && j % 7 == 0) continue;
                if (j != 11 && j % 11 == 0) continue;
                if (j != 13 && j % 13 == 0) continue;
                if (j != 17 && j % 17 == 0) continue;
                if (j != 19 && j % 19 == 0) continue;
                if (j != 23 && j % 23 == 0) continue;
                if (j != 29 && j % 29 == 0) continue;
                if (j != 31 && j % 31 == 0) continue;
                if (j != 37 && j % 37 == 0) continue;
                if (j != 41 && j % 41 == 0) continue;

                count = 0;
                for (int i = 0; i < n; i++)
                {
                    if (a[i] % j == 0) count++;
                }
                if (count > 1) isP = false;

            }

            if (isP) Cout("pairwise coprime");
            else Cout("setwise coprime");

            //ここまで
        }

        static int gcd(int a, int b)
        {
            if (a > b)
            {
                int temp = a;
                a = b;
                b = temp;
            }

            while (true)
            {
                int amari = b % a;
                if (amari == 0) { return a; }
                b = a;
                a = amari;
            }
        }



        static void Cout(string s)
        {
            Console.WriteLine(s);
            return;
        }

        static void Cout(int n)
        {
            Console.WriteLine(n);
            return;
        }

        static void Cout(long n)
        {
            Console.WriteLine(n);
            return;
        }

        static int ReadInt()
        {
            return int.Parse(Console.ReadLine());
        }

        static int[] ReadArray(int n)
        {
            string[] str = Console.ReadLine().Split(' ');
            int[] a = new int[n];
            for (int i = 0; i < n; i++) { a[i] = int.Parse(str[i]); }
            return a;
        }
        static long[] ReadArray(long n)
        {
            string[] str = Console.ReadLine().Split(' ');
            long[] a = new long[n];
            for (long i = 0; i < n; i++) { a[i] = long.Parse(str[i]); }
            return a;
        }

        static long ReadLong()
        {
            return long.Parse(Console.ReadLine());
        }

        static int Min(int a, int b)
        {
            if (a < b) return a;
            return b;
        }

        static int Max(int a, int b)
        {
            if (a > b) return a;
            return b;
        }


    }

}
