#include <bits/stdc++.h>
const long long M = 1e9 + 7;
using namespace std;
long long gcd(long long x, long long y) {
  if (y > x) swap(x, y);
  if (y == 0) return x;
  return gcd(y, x % y);
}
void solve() {
  long long n;
  cin >> n;
  long long a[n];
  long long count = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  long long ans = a[0];
  for (long long i = 1; i < n; i++) ans = gcd(ans, a[i]);
  if (ans > 1) {
    cout << "not coprime";
    return;
  }
  map<long long, long long> mp;
  for (long long i = 0; i < n; i++) {
    long long t = a[i];
    if (t % 2 == 0) {
      mp[2]++;
      while (t % 2 == 0) t /= 2;
    }
    for (long long j = 3; j <= sqrt(a[i]); j += 2) {
      if (t % j == 0) {
        mp[j]++;
        while (t % j == 0) t /= j;
      }
    }
    if (t > 2) mp[t]++;
  }
  for (auto it = mp.begin(); it != mp.end(); it++) {
    if (it->second > (long long)1) {
      cout << "setwise coprime";
      return;
    }
  }
  cout << "pairwise coprime";
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  solve();
}
