#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; i++) cin >> a[i];
  set<long long> s;
  bool flag = true;
  for (long long i = 0; i < n; i++) {
    long long x = a[i];
    for (long long j = 2; j * j <= x; j++) {
      if (x % j == 0) {
        if (s.find(j) != s.end()) {
          flag = false;
          break;
        }
        s.insert(j);
        while (x % j == 0) {
          x /= j;
        }
      }
    }
    if (!flag) break;
  }
  if (flag) {
    cout << "pairwise coprime\n";
    return 0;
  }
  long long gg = 0LL;
  for (long long i = 0; i < n; i++) {
    gg = gcd(gg, a[i]);
  }
  if (gg == 1LL)
    cout << "setwise coprime\n";
  else
    cout << "not coprime\n";
}
