using System.Linq;
using System.Text;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Diagnostics;
using System.Threading;
using System.Runtime.CompilerServices;
using System.IO.Pipes;

namespace AtCoder
{
    class Program
    {

        struct Point
        {
            public int x;
            public int y;

            public Point(int x, int y)
            {

                this.x = x;
                this.y = y;

            }

        }


        const int BiggestMod = 1000000007;

        public static void Main()
        {

            /*

            int num = int.Parse(Console.ReadLine());
            long ans = 0;

            long[] args = Console.ReadLine().Split(' ').Select(x => long.Parse(x)).ToArray();

            long[] data = new long[num - 1];

            data[num - 2] = args[num - 1];

            for (int i = num - 2; 0 < i; --i)
                data[i - 1] = args[i] + data[i];

            for (int i = 0; i < num - 1; ++i)
            {

                ans += args[i] * data[i];
                ans %= BiggestMod;

            }

            Console.WriteLine(ans);
            
             */

            int num = int.Parse(Console.ReadLine());

            int GetGcd(int a, int b)
                => Gcd(Math.Max(a, b), Math.Min(a, b));

            int Gcd(int a, int b)
                => (a % b == 0 ? b : Gcd(b, a % b));

            var args = Console.ReadLine().Split(' ').Select(x => int.Parse(x)).ToArray();
            var buf = args[0];

            for (int i = 1; i < num; ++i)
            {

                buf = GetGcd(buf, args[i]);
                if (buf == 1)
                {
                    goto skip;
                }

            }

            Console.WriteLine("not coprime");
            return;

        skip:

            Array.Sort(args);

            for (int i = 0; i + 1< num; ++i)
                for (int j = i + 1; j < num; ++j)
                    if (Gcd(args[j], args[i]) == 1)
                    {

                        Console.WriteLine("setwise coprime");
                        return;

                    }

            Console.WriteLine("pairwise coprime");
            return;

        }

    }

}