#include <bits/stdc++.h>
using namespace std;
void doit() {
  long long n, i;
  unordered_map<long long, long long> mp;
  cin >> n;
  for (i = 0; i < n; i++) {
    long long x;
    cin >> x;
    long long j;
    for (j = 2; j * j <= x; j++) {
      if (x % j == 0) {
        mp[j]++;
        while (x % j == 0) x /= j;
      }
    }
    if (x > 2) {
      mp[x]++;
    }
  }
  long long ans = 0;
  for (auto p : mp) ans = max(ans, p.second);
  if (ans == 1) {
    cout << "pairwise coprime"
         << "\n";
    return;
  }
  if (ans != n) {
    cout << "setwise coprime"
         << "\n";
    return;
  }
  cout << "not coprime"
       << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  for (long long i = 1; i <= t; i++) {
    doit();
  }
}
