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

namespace AtCoder
{
    class Program
    {
        private static long mod = 1000000007;
        static void Main(string[] args)
        {
            var n = int.Parse(ReadLine());
            var line = ReadLine().Split(' ').Select(value => int.Parse(value)).ToArray();

            var isCoprime = true;

            for(var i = 1; i < line.Length; i++)
            {
                if(GCD(line[i - 1], line[i]) != 1)
                {
                    isCoprime = false;
                    break;
                }
            }

            if(isCoprime)
            {
                WriteLine("pairwise coprime");
                return;
            }

            var gcd = line[0];
            for(var i = 1; i < line.Length; i++)
            {
                gcd = GCD(gcd, line[i]);
                if(gcd == 1)
                {
                    WriteLine("setwise coprime");
                    return;
                }
            }

            WriteLine("not coprime");
        }

        private static int GCD(int x, int y)
        {
            if(y == 0)
            {
                return x;
            }
            return GCD(y, x % y);
        }
    }
}