#include <bits/stdc++.h>
using namespace std;
bool isp[1001000];
long long gcd(long long a, long long b) { return (b == 0 ? a : gcd(b, a % b)); }
bool setwise_coprime(vector<long long> vl) {
  long long Gcd = vl[0];
  for (long long i = 1; i < vl.size(); i++) {
    Gcd = gcd(Gcd, vl[i]);
  }
  return Gcd == 1;
}
signed main() {
  isp[0] = isp[1] = 1;
  vector<long long> prime;
  for (long long i = 2; i <= 1000000; i++) {
    if (!isp[i]) prime.push_back(i);
    for (long long j = i * i; j <= 1000000; j += i) {
      isp[j] = 1;
    }
  }
  long long n;
  cin >> n;
  map<long long, long long> mp;
  vector<long long> vl(n);
  for (long long i = 0; i < n; i++) {
    long long a;
    cin >> a;
    vl[i] = a;
    for (long long j = 0; j < prime.size(); j++) {
      if (long long(prime[j] * prime[j]) > a) {
        break;
      }
      pair<long long, long long> cnt;
      cnt.first = 0;
      cnt.second = 0;
      while (a % prime[j] == 0) {
        cnt.first = prime[j];
        cnt.second++;
        a /= prime[j];
      }
      if (cnt.first != 0) {
        mp[cnt.first]++;
      }
    }
  }
  map<long long, long long>::iterator it, it1;
  bool isok = 1;
  for (it = mp.begin(); it != mp.end(); it++) {
    if (it->second > 1) isok = false;
  }
  if (isok) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  if (setwise_coprime(vl)) {
    cout << "setwise coprime" << endl;
    return 0;
  } else
    cout << "not coprime" << endl;
  return 0;
}
