#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  map<int, int> m;
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    m[a[i]]++;
  }
  sort((a).begin(), (a).end());
  bool ok2 = true;
  vector<int> is_prime(a[n - 1] + 1, 1);
  is_prime[0] = 0, is_prime[1] = 0;
  for (int i = 2; i < a[n - 1]; i++) {
    if (!is_prime[i]) continue;
    bool ok = false;
    for (int j = i; j < a[n - 1]; j += i) {
      if (!ok) {
        if (m[j]) ok = true;
      } else {
        if (m[j]) ok2 = false;
      }
    }
  }
  int g = 0;
  for (int i = 0; i < (n); ++i) g = gcd(g, a[i]);
  if (ok2) {
    cout << "pairwise coprime" << endl;
  } else if (g == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
