#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int a, long long int b) {
  if (a < b) swap(a, b);
  if (a % b == 0) return b;
  return gcd(a % b, b);
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
int main() {
  long long int N;
  cin >> N;
  vector<long long int> A(N);
  for (long long int i = 0; i < N; i++) {
    cin >> A[i];
  }
  sort((A).begin(), (A).end());
  reverse((A).begin(), (A).end());
  long long int GCD = A[0];
  for (long long int i = 0; i < N; i++) {
    GCD = gcd(GCD, A[i]);
  }
  if (GCD != 1) {
    cout << "not coprime" << endl;
    return 0;
  }
  for (long long int i = 2; i * i <= min(A[0] + 100, A[0] * A[0]); i++) {
    bool ex = false;
    for (long long int j = 0; j < N; j++) {
      if (A[j] % i == 0) {
        if (ex == true) {
          cout << "setwise coprime" << endl;
          return 0;
        } else {
          ex = true;
        }
      }
    }
  }
  cout << "pairwise coprime" << endl;
}
