#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a % b == 0) {
    return (b);
  } else {
    return (gcd(b, a % b));
  }
}
int main() {
  int N;
  cin >> N;
  vector<int> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A.at(i);
  }
  int xx = 0;
  int yy = 0;
  for (int i = 0; i < N - 1; i++) {
    if (xx == 1 && yy == 1) {
      break;
    }
    for (int j = i + 1; j < N; j++) {
      if (xx == 1 && yy == 1) {
        break;
      } else if (gcd(A.at(i), A.at(j)) == 1) {
        xx = 1;
      } else {
        yy = 1;
      }
    }
  }
  if (xx == 1 && yy == 1) {
    cout << "setwise coprime" << endl;
  } else if (xx == 1 && yy != 1) {
    cout << "pairwise coprime" << endl;
  } else if (xx != 1 && yy == 1) {
    cout << "not coprime" << endl;
  }
}
