#include <bits/stdc++.h>
using namespace std;
long long binpow(long long a, long long b) {
  long long ans = 1;
  if (b == 0) return 1;
  while (b) {
    if (b & 1) ans = ans * a;
    a = a * a;
    b >>= 1;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) {
    long long n;
    cin >> n;
    long long a[n];
    for (long long i = 0; i < n; ++i) cin >> a[i];
    sort(a, a + n);
    long long val1 = 0;
    bool f = 0, f1 = 0;
    for (long long i = 0; i < n - 1; ++i) {
      long long val = gcd(a[i], a[i + 1]);
      if (val != 1) {
        f = 1;
        break;
      }
    }
    val1 = a[n - 1];
    for (long long i = 0; i < n - 1; ++i) {
      val1 = gcd(val1, a[i]);
    }
    if (!f) {
      cout << "pairwise coprime"
           << "\n";
    } else if (val1 == 1) {
      cout << "setwise coprime"
           << "\n";
    } else {
      cout << "not coprime"
           << "\n";
    }
  }
}
