#include <bits/stdc++.h>
using namespace std;
const int MAX = 1000005;
int64_t N;

bool pairwize(vector<int64_t> &A)
{
  vector<bool> divs(MAX, false);
  for (int i = 0; i < N; i++)
  {
    if (divs.at(A.at(i)))
    {
      return false;
    }
    divs.at(A.at(i)) = true;
    for (int j = 2; j * j <= A.at(i); j++)
    {
      if (A.at(i) % j != 0)
        continue;
      if (divs.at(j))
      {
        return false;
      }
      divs.at(j) = true;
      int k = A.at(i) / j;
      if (j != k)
      {
        if (divs.at(k))
        {
          return false;
        }
        divs.at(k) = true;
      }
    }
  }
  return true;
}

int main()
{
  cin >> N;
  vector<int64_t> A(N);
  for (int i = 0; i < N; i++)
  {
    cin >> A.at(i);
  }
  if (pairwize(A))
  {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int64_t g = gcd(A.at(0), A.at(1));
  for (int i = 2; i < N; i++)
  {
    g = gcd(g, A.at(i));
  }
  if (g == 1)
  {
    cout << "setwise coprime" << endl;
  }
  else
  {
    cout << "not coprime" << endl;
  }
}