#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool PN(T x) {
  if (x <= 1) return false;
  if (x == 2) return true;
  for (int i = 2; i < sqrt(x) + 1; i++)
    if (x % i == 0) return false;
  return true;
}
const long long MOD = 1e9 + 7;
long long Comb(int n, int i) {
  long long ans = 1;
  if (i > n || i < 0) return 0;
  if (i == 0 || i == n)
    return 1;
  else {
    for (int j = 1; j <= i; ++j) {
      ans *= (n + 1 - j);
      ans /= j;
      ans %= MOD;
    }
  }
  return ans;
}
template <typename T>
T gcd(T a, T b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
template <typename T>
T lcm(T a, T b) {
  if (b > a) swap(a, b);
  T g = gcd(a, b);
  return a / g * b;
}
void solve() {
  int n;
  cin >> n;
  int a[n];
  int g;
  bool sc, pc;
  pc = true;
  if (n > 78498) pc = false;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    int tmp = a[i];
    if (i == 0) g = a[i];
    if (i != 0) {
      if (g < tmp) swap(tmp, g);
      g = gcd(g, tmp);
      if (g == 1) {
        sc = true;
      }
    }
  }
  if (g != 1) sc = false;
  if (pc == false && sc == false) {
    cout << "not coprime" << endl;
    return;
  } else if (sc && pc == false) {
    cout << "setwise coprime" << endl;
    return;
  } else {
    for (int i = 0; i < n - 1; ++i) {
      for (int j = i + 1; j < n; ++j) {
        int aa = a[i], bb = a[j];
        if (aa < bb) swap(aa, bb);
        if (gcd(aa, bb) != 1) {
          pc = false;
          break;
        }
      }
    }
  }
  if (pc == true)
    cout << "pairwise coprime" << endl;
  else if (pc == false && sc)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
}
int main(void) {
  solve();
  return 0;
}
