#include <bits/stdc++.h>
const long long MOD = 1e9 + 7;
const long long INF = 1LL << 60;
const double PI = 3.14159265358979323846;
const int NMAX = 100005;
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n), b(1000001, 0);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[a[i]]++;
  }
  sort(a.begin(), a.end());
  long long sq = sqrt(a[n - 1]);
  bool pairwise = true;
  bool setwise = true;
  int j_begin = 0;
  for (int i = 2; i <= sq + 1; i++) {
    int cnt = 0;
    for (int j = j_begin; j < n; j++) {
      if (a[j] % i == 0) cnt++;
      if (a[j] < i) {
        j_begin = j + 1;
      }
    }
    if (cnt > 1 && cnt < n)
      pairwise = false;
    else if (cnt == n) {
      pairwise = false;
      setwise = false;
      break;
    }
  }
  for (int i = 2; i < 1000001; i++) {
    if (b[i] == n) {
      pairwise = false;
      setwise = false;
      break;
    } else if (b[i] > 1) {
      pairwise = false;
    }
  }
  if (pairwise) {
    cout << "pairwise coprime" << endl;
  } else if (setwise) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  return 0;
}
