#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long inf = 1LL << 61;
long long gcd(long long a, long long b) {
  if (b == 0) {
    return a;
  } else {
    return gcd(b, a % b);
  }
}
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<long long> est(1e3 + 1);
  vector<long long> prime;
  for (long long i = 2; i <= 1e3; i++) {
    if (est[i] == 0) {
      prime.push_back(i);
      for (long long j = 1; j * i <= 1e3; j++) {
        est[j * i] = 1;
      }
    }
  }
  vector<long long> p(1e6 + 1);
  vector<long long> s(1e6 + 1);
  long long f = 0;
  for (long long tmp : prime) {
    long long cnt = 0;
    for (long long i = 0; i < n; i++) {
      if (a[i] % tmp == 0) cnt++;
    }
    if (cnt > 1) f = 1;
  }
  long long tmp = a[0];
  for (long long i = 0; i < n; i++) {
    tmp = gcd(a[i], tmp);
  }
  if (tmp != 1) f++;
  if (f == 0) {
    cout << "pairwise coprime" << endl;
  } else if (f == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
