#include <bits/stdc++.h>
using namespace std;
long long INF = 1e18;
long long mod = 1e9 + 7;
long long dx[4] = {1, 0, -1, 0};
long long dy[4] = {0, 1, 0, -1};
long long cnt[1000005];
long long gcd(long long X, long long Y) {
  if (X % Y == 0) {
    return Y;
  } else {
    return gcd(Y, X % Y);
  }
}
signed main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  long long GCD = 0;
  for (long long i = 0; i < N; i++) {
    cin >> A[i];
    if (i == 0) {
      GCD = A[i];
    }
    long long X = A[i];
    for (long long j = 2; j * j <= A[i]; j++) {
      if (X % j == 0) {
        cnt[j]++;
        while (X % j == 0) {
          X /= j;
        }
      }
    }
    if (X >= 2) {
      cnt[X]++;
    }
    GCD = gcd(GCD, A[i]);
  }
  bool ok = true;
  for (long long i = 1; i <= 1000000; i++) {
    if (cnt[i] >= 2) {
      ok = false;
    }
  }
  if (ok) {
    cout << "pairwise coprime" << endl;
  } else if (GCD == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
