#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 long long N = 1e6;
vector<bool> prime(N + 1, 1);
vector<long long> primes;
void sieve() {
  prime[0] = 0;
  prime[1] = 0;
  for (long long i = 2; i * i <= N; i++) {
    if (prime[i]) {
      primes.push_back(i);
      for (long long j = i * i; j <= N; j += i) prime[j] = 0;
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  sieve();
  long long n;
  cin >> n;
  long long a[n], mx = 0;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    mx = max(mx, a[i]);
  }
  bool check = true;
  for (auto x : primes) {
    if (x > mx) break;
    int curr = 0;
    for (long long j = 0; j < n; j++) curr += !(a[j] % x);
    if (curr > 1) {
      check = false;
      break;
    }
  }
  if (check) {
    cout << "pairwise coprime"
         << "\n";
    return 0;
  }
  long long g = a[0];
  for (long long i = 1; i < n; i++) g = gcd(a[i], g);
  if (g == 1)
    cout << "setwise coprime"
         << "\n";
  if (!check && g != 1)
    cout << "not coprime"
         << "\n";
  return 0;
}
