#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a * b == 0) {
    return a + b;
  }
  return gcd(b, a % b);
}
long long p[100500], used[1000500];
bool prime[100500];
void solve() {
  long long n, g = 0, k = 0;
  for (long long i = 2; i <= 1e5; i++) {
    if (prime[i]) continue;
    p[k++] = i;
    for (long long j = i * i; j + i <= 1e5; j += i) {
      prime[j] = true;
    }
  }
  cin >> n;
  bool ok = true;
  for (int i = 0; i < n; i++) {
    long long t;
    cin >> t;
    g = gcd(g, t);
    long long j = 0;
    while (t > 1 && p[j] <= t && p[j] > 0) {
      if (t % p[j] == 0 && used[p[j]] > 0) {
        ok = false;
        break;
      }
      while (t % p[j] == 0) {
        used[p[j]] = 1;
        t /= p[j];
      }
      j++;
    }
    if (t > 1) used[t] = 1;
  }
  if (ok)
    cout << "pairwise coprime";
  else if (g == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve();
  }
}
