using System;
using System.Collections.Generic;
using System.Linq;

namespace abc177_e
{
  class Program
  {
    static void Main(string[] args)
    {
      var N = CIn.ReadInt();
      var A = CIn.ReadIntArray(N);

      var pn = MathTools.PrimeNumbers((long)Math.Sqrt(1e6));
      var pf = new Dictionary<long, long>();
      var gcd = 0L;

      for (int i = 0; i < N; i++)
      {
        if (i == 0)
        {
          gcd = A[i];
        }
        else
        {
          gcd = MathTools.Gcd(gcd, A[i]);
        }

        foreach (var item in new HashSet<long>(MathTools.PrimeFactors(A[i], pn)))
        {
          if (pf.ContainsKey(item)) pf[item]++;
          else pf.Add(item, 1);
        }
      }

      if (pf.All(e => e.Value <= 1)) Console.WriteLine("pairwise coprime");
      else if (gcd == 1) Console.WriteLine("setwise coprime");
      else Console.WriteLine("not coprime");
    }
  }

  static class MathTools
  {
    public static long Gcd(long a, long b)
    {
      while (b != 0)
      {
        var mod = a % b;
        a = b;
        b = mod;
      }
      return a;
    }

    public static long Lcm(long a, long b)
    {
      return a * b / Gcd(a, b);
    }

    public static List<long> PrimeNumbers(long n)
    {
      var list = new List<long>();
      var sieve = new bool[n + 1];

      for (var i = 2; i <= n; i++)
      {
        if (!sieve[i])
        {
          list.Add(i);
          for (var j = i * 2; j <= n; j += i)
          {
            sieve[j] = true;
          }
        }
      }
      return list;
    }

    public static List<long> PrimeFactors(long n)
    {
      var primeNumbers = PrimeNumbers((long)Math.Sqrt(n));
      return PrimeFactors(n, primeNumbers);
    }

    public static List<long> PrimeFactors(long n, List<long> primeNumbers)
    {
      var list = new List<long>();
      var sqrt = (long)Math.Sqrt(n);

      foreach (var p in primeNumbers)
      {
        if (p > sqrt || n == 1) break;
        while (n % p == 0)
        {
          n /= p;
          list.Add(p);
        }
      }
      if (n > 1)
      {
        list.Add(n);
      }
      return list;
    }
  }

  static class CIn
  {
    private static readonly Queue<string> fieldBuffer = new Queue<string>();

    public static string Read()
    {
      if (fieldBuffer.Count == 0)
      {
        foreach (var field in Console.ReadLine().Split())
        {
          fieldBuffer.Enqueue(field);
        }
      }
      return fieldBuffer.Dequeue();
    }

    public static int ReadInt() => int.Parse(Read());
    public static long ReadLong() => long.Parse(Read());
    public static double ReadDouble() => double.Parse(Read());

    public static string[] ReadStringArray(int n)
    {
      var array = new string[n];
      for (var i = 0; i < n; i++)
      {
        array[i] = Read();
      }
      return array;
    }

    public static int[] ReadIntArray(int n)
    {
      var array = new int[n];
      for (var i = 0; i < n; i++)
      {
        array[i] = ReadInt();
      }
      return array;
    }

    public static long[] ReadLongArray(int n)
    {
      var array = new long[n];
      for (var i = 0; i < n; i++)
      {
        array[i] = ReadLong();
      }
      return array;
    }

    public static double[] ReadDoubleArray(int n)
    {
      var array = new double[n];
      for (var i = 0; i < n; i++)
      {
        array[i] = ReadDouble();
      }
      return array;
    }

    public static char[,] ReadCharMatrix(int h, int w)
    {
      var array = new char[h, w];
      for (var i = 0; i < h; i++)
      {
        var l = Console.ReadLine().ToCharArray();
        for (var j = 0; j < w; j++)
        {
          array[i, j] = l[j];
        }
      }
      return array;
    }
  }
}
