#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long exp(long long x, long long n, long long mod) {
  long long result = 1;
  while (n) {
    if (n & 1) result = (result * x) % mod;
    x = (x * x) % mod;
    n >>= 1;
  }
  return result;
}
const int N = 1e6;
vector<bool> prime(N + 1, 1);
void sieve() {
  prime[0] = prime[1] = 0;
  for (int i = 2; i * i <= N; i++) {
    if (prime[i]) {
      for (int j = i * i; j <= N; j += i) prime[j] = false;
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  sieve();
  int n;
  cin >> n;
  int a[n], mx = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    mx = max(mx, a[i]);
  }
  bool x = true, y = true;
  int g = a[0];
  for (int i = 1; i < n; i++) g = gcd(a[i], g);
  x = (g == 1);
  for (int i = 2; i <= mx; i++) {
    if (prime[i]) {
      int curr = 0;
      for (int j = 0; j < n; j++) curr += !(a[j] % i);
      if (curr > 1) {
        y = false;
        break;
      }
    }
  }
  if (y)
    cout << "pairwise coprime"
         << "\n";
  else if (x)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
  return 0;
}
