#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
const long long INF = 1LL << 60;
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int lcm(int a, int b) { return a * b / gcd(a, b); }
bool IsPrime(int num) {
  if (num < 2)
    return false;
  else if (num == 2)
    return true;
  else if (num % 2 == 0)
    return false;
  double sqrtNum = sqrt(num);
  for (int i = 3; i <= sqrtNum; i += 2) {
    if (num % i == 0) {
      return false;
    }
  }
  return true;
}
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (int)(n); i++) cin >> a[i];
  bool pair = true;
  bool set = false;
  vector<int> b;
  for (int i = 0; i < (int)(n); i++) {
    if (!IsPrime(a[i])) b.push_back(a[i]);
  }
  int g = gcd(a[0], a[1]);
  for (int i = (int)(2); i <= (int)(n - 1); i++) {
    g = gcd(g, a[i]);
  }
  if (g == 1) set = true;
  for (int i = 0; i < (int)(b.size()); i++) {
    for (int j = 0; j < (int)(100); j++) {
      if (i == j) continue;
      if (gcd(b[i], b[j]) != 1) {
        if (set) {
          cout << "setwise coprime" << endl;
          return 0;
        } else {
          cout << "not coprime" << endl;
          return 0;
        }
      }
      if (gcd(b[i], b[b.size() - j]) != 1) {
        if (set) {
          cout << "setwise coprime" << endl;
          return 0;
        } else {
          cout << "not coprime" << endl;
          return 0;
        }
      }
    }
  }
  cout << "pairwise coprime" << endl;
  return 0;
}
