#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
int N;
vi A(1000000 + 1);
vi Primes;
void make_sieve() {
  vector<bool> Sieve(1000000 + 1, true);
  for (int i = 2; i * i <= 1000000; i++) {
    if (Sieve[i]) {
      Primes.push_back(i);
      int j = i * i;
      while (j <= 1000000) {
        Sieve[j] = false;
        j += i;
      }
    }
  }
}
int main() {
  make_sieve();
  cin >> N;
  for (int i = (0); i < (N); ++i) {
    cin >> A[i];
  }
  int ans = 0;
  for (int i = (0); i < (Primes.size()); ++i) {
    int fact = 0;
    for (int n = (0); n < (N); ++n) {
      if (A[n] % Primes[i] == 0) fact++;
    }
    if (fact == N) {
      ans = 2;
      break;
    } else if (fact >= 2) {
      ans = 1;
    }
  }
  if (ans == 0)
    cout << "pairwise coprime";
  else if (ans == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
