#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
vector<long long int> minprime(1e6 + 1, 1), ffc(1e6 + 1);
void sieve() {
  for (long long i = 2; i * i <= 1e6; i++) {
    if (minprime[i] == 1) {
      for (long long j = i; j <= 1e6; j += i) minprime[j] = i;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    long long n;
    cin >> n;
    vector<long long int> a(n);
    for (long long int i = 0; i < n; i++) cin >> a[i];
    sieve();
    for (long long int i = 0; i < n; i++) {
      set<long long> fac;
      while (a[i] != 1) {
        fac.insert(minprime[a[i]]);
        a[i] /= minprime[a[i]];
      }
      for (auto &&it : fac) {
        ffc[it]++;
      }
    }
    for (long long int i = 0; i < 1e6 + 1; i++)
      if (ffc[i] == n) {
        cout << "not coprime"
             << "\n";
        return 0;
      }
    long long fl = 0;
    for (long long int i = 0; i < 1e6 + 1; i++) {
      if (ffc[i] > 1) fl = 1;
    }
    if (fl == 0)
      cout << "pairwise coprime"
           << "\n";
    else
      cout << "setwise coprime"
           << "\n";
  }
  return 0;
}
