#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
const int INF = 1001001001;
const double PI = acos(-1);
int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
int main() {
  long long n;
  cin >> n;
  vector<long long> A(n), M(1000002, 0);
  for (int i = 0; i < (n); ++i) cin >> A[i];
  bool isPairWise = true;
  bool isSetWise = true;
  for (int i = 0; i < (n); ++i) {
    for (long long a = 1; a * a <= A[i]; a++) {
      if (A[i] % a == 0) {
        M[A[i] / a] += 1;
        if (a * a != A[i]) M[a] += 1;
      }
    }
  }
  for (int i = 2; i <= 1000001; i++) {
    if (M[i] >= 2) isPairWise = false;
    if (M[i] == n) isSetWise = false;
  }
  if (isPairWise) {
    cout << "pairwise coprime" << endl;
  } else if (isSetWise) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
