#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
vector<bool> Sieve(int n) {
  vector<bool> is_prime(n + 1, true);
  is_prime[0] = is_prime[1] = false;
  for (int i = 2; i <= n; i++) {
    if (is_prime[i] && 1LL * i * i <= n) {
      for (int j = i * i; j <= n; j += i) is_prime[j] = false;
    }
  }
  return is_prime;
}
void jabru() {
  vector<bool> p = Sieve(1000000);
  vector<int> xx;
  for (int i = 1; i <= 1000000; i++) {
    if (p[i]) xx.push_back(i);
  }
  int n;
  cin >> n;
  vector<int> v(n);
  for (long long i = 0; i < n; i++) cin >> v[i];
  int gcc = v[0];
  map<int, int> has;
  bool is_pos = 1;
  for (long long i = 0; i < n; i++) {
    gcc = gcd(gcc, v[i]);
    if (is_pos) {
      int h;
      if (v[i] > xx[xx.size() - 1])
        h = xx.size() - 1;
      else {
        h = lower_bound(xx.begin(), xx.end(), v[i]) - xx.begin();
      }
      for (int j = h; j > -1; j--) {
        if (v[i] % xx[j] == 0) {
          if (has[xx[j]]) {
            is_pos = 0;
            break;
          } else {
            has[xx[j]] = 1;
          }
        }
      }
    }
  }
  if (is_pos) {
    cout << "pairwise coprime"
         << "\n";
  } else if (gcc == 1) {
    cout << "setwise coprime"
         << "\n";
  } else {
    cout << "not coprime"
         << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  jabru();
  return 0;
}
