#include <bits/stdc++.h>
using namespace std;
using Graph = vector<vector<int>>;
const long long l_INF = 1010101010101010;
const int INF = 1010101010;
const int dx[4] = {-1, 0, 1, 0};
const int dy[4] = {0, -1, 0, 1};
using vi = vector<int>;
using vll = vector<long long>;
using vvi = vector<vi>;
using vvll = vector<vll>;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
int main() {
  int n;
  cin >> n;
  vi a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  int x = max(n + 1, 1001);
  bool setjudge = false;
  for (int i = 0; i < x; i++) {
    if (i < 2) continue;
    bool judge = false;
    for (int j = 0; j < n; j++) {
      if (judge && a[j] % i == 0) {
        setjudge = true;
        break;
      } else if (a[j] % i == 0)
        judge = true;
    }
  }
  if (setjudge) {
    for (int i = 0; i < x; i++) {
      if (i < 2) continue;
      bool judge = true;
      for (int j = 0; j < n; j++) {
        if (a[j] % i != 0) judge = false;
      }
      if (judge) {
        cout << "not coprime" << endl;
        return 0;
      }
    }
    cout << "setwise coprime" << endl;
  } else {
    cout << "pairwise coprime" << endl;
  }
}
