#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; }
int main() {
  int N, t;
  cin >> N;
  vector<int> ar(N);
  int A = 0;
  for (int i = 0; i < N; i++) {
    cin >> ar[i];
    A = max(A, ar[i]);
  }
  vector<int> D(A + 1, 0);
  for (int i = 2; i <= A; i++) {
    if (D[i] == 0) {
      t = i;
      while (t <= A) {
        if (D[t] == 0) D[t] = i;
        t += i;
      }
    }
  }
  vector<int> E(A + 1, 0);
  bool b = true;
  for (int i = 0; i < N; i++) {
    vector<int> F(A + 1, 0);
    t = ar[i];
    while (t > 1) {
      if (E[D[t]] == 1) {
        b = false;
        break;
      }
      F[D[t]] = 1;
      t /= D[t];
    }
    if (b == false) break;
    for (int i = 0; i < A + 1; i++) {
      E[i] += F[i];
    }
  }
  if (b) {
    cout << "pairwise coprime" << endl;
  } else {
    t = ar[0];
    for (int i = 0; i < N - 1; i++) t = gcd(t, ar[i + 1]);
    if (t == 1) {
      cout << "setwise coprime" << endl;
    } else
      cout << "not coprime" << endl;
  }
}
