#include <bits/stdc++.h>
using namespace std;
int gcd(long long, long long);
int main() {
  long long n;
  long long x;
  long long gc = 0;
  bool pc = true;
  cin >> n;
  vector<long long> a(n);
  vector<long long> c(1000005);
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
    c[a[i]]++;
  }
  for (long long i = 2; i < 1000005; i++) {
    int count = 0;
    for (long long j = i; j < 1000005; j += i) {
      count += c[j];
    }
    if (count > 1) {
      pc = false;
    }
  }
  if (pc) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  for (int i = 0; i < (n); i++) gc = gcd(gc, a[i]);
  if (gc == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
int gcd(long long a, long long b) {
  if (a % b == 0)
    return b;
  else
    gcd(b, a % b);
}
