#include <bits/stdc++.h>
using namespace std;
map<long long int, int> prime_factor(long long int n) {
  map<long long int, int> ret;
  for (long long int i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      ret[i]++;
      n /= i;
    }
  }
  if (n != 1) ret[n] = 1;
  return ret;
}
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
long long int lcm(long long int a, long long int b) {
  return a / gcd(a, b) * b;
}
map<long long int, int> v;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
    auto res = prime_factor(a[i]);
    for (auto it : res) v[it.first]++;
  }
  int f = true;
  for (auto it : v) {
    if (v[it.first] >= 2) f = false;
  }
  if (f) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  long long int x = a[0];
  for (int i = 1; i < n; ++i) {
    x = gcd(x, a[i]);
  }
  if (x == 1) {
    cout << "setwise coprime" << endl;
    return 0;
  }
  cout << "not coprime" << endl;
  return 0;
}
