#include <bits/stdc++.h>
using namespace std;
long long int spf[100001];
void sieve() {
  spf[1] = 1;
  for (long long int i = 2; i < 100001; i++) spf[i] = i;
  for (long long int i = 4; i < 100001; i += 2) spf[i] = 2;
  for (long long int i = 3; i * i < 100001; i++) {
    if (spf[i] == i) {
      for (long long int j = i * i; j < 100001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
void get(map<long long int, long long int> &ma, long long int a[],
         long long int n) {
  for (long long int i = 0; i < n; i++) {
    while (a[i] != 1) {
      ma[spf[a[i]]]++;
      long long int temp = spf[a[i]];
      while (spf[a[i]] == temp) {
        a[i] = a[i] / spf[a[i]];
      }
    }
  }
  long long int gcd = 1, f = 0;
  map<long long int, long long int>::iterator it;
  for (it = ma.begin(); it != ma.end(); it++) {
    long long int d = (it->second) / n;
    if (d != 0) gcd = gcd * (it->first);
    if (it->second != 1) {
      f = 1;
    }
  }
  if (f == 0) {
    cout << "pairwise coprime" << endl;
  } else if (gcd == 1) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
int main() {
  sieve();
  long long int n;
  cin >> n;
  long long int a[n];
  map<long long int, long long int> ma;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
  }
  get(ma, a, n);
}
