#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 int INF = 1LL << 60;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
struct edge {
  long long int from, to, cost;
};
long long int gcd(long long int a, long long int b) {
  if (a % b == 0)
    return (b);
  else
    return (gcd(b, a % b));
}
int main() {
  long long int n;
  cin >> n;
  long long int a[n];
  bool num[1100000];
  fill(num, num + 1100000, false);
  bool x = false;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    if (num[a[i]]) {
      x = true;
    }
    num[a[i]] = true;
  }
  if (x) {
    cout << "not coprime" << endl;
    return 0;
  }
  bool p = true, s = true;
  bool era[1100000];
  fill(era, era + 1100000, true);
  for (long long int i = 2; i <= 1000000; i++) {
    if (era[i]) {
      long long int con = 0;
      for (long long int j = i; j <= 1000000; j += i) {
        if (num[j]) con++;
        era[j] = false;
      }
      if (con > 1) {
        p = false;
      }
      if (con == n) {
        s = false;
      }
    }
  }
  if (p) {
    cout << "pairwise coprime" << endl;
  } else if (s) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
