#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long N = 3e5 + 10;
long long gcd(long long n, long long m) {
  if (n == 0) {
    return m;
  } else {
    return gcd(m % n, n);
  }
}
long long a[N];
long long prime[1000005];
long long mp[1000005];
long long ans[1000005];
long long fre[N];
long long lpf[1000005], mobius[1000005];
void least_prime_factor() {
  for (long long i = 2; i <= 1000000; i++) {
    if (!lpf[i]) {
      for (long long j = i; j <= 1000000; j += i) {
        if (!lpf[j]) {
          lpf[j] = i;
        }
      }
    }
  }
}
void Mobius() {
  for (long long i = 1; i <= 1000000; i++) {
    if (i == 1)
      mobius[i] = 1;
    else {
      if (lpf[i / lpf[i]] == lpf[i])
        mobius[i] = 0;
      else
        mobius[i] = -1 * mobius[i / lpf[i]];
    }
  }
}
long long gcd_pairs(long long a[], long long n) {
  long long maxi = 0;
  for (long long i = 1; i <= n; i++) {
    fre[a[i]]++;
    maxi = max(a[i], maxi);
  }
  least_prime_factor();
  Mobius();
  long long ans = 0;
  for (long long i = 1; i <= maxi; i++) {
    if (!mobius[i]) continue;
    long long temp = 0;
    for (long long j = i; j <= maxi; j += i) temp += fre[j];
    ans += temp * (temp - 1) / 2 * mobius[i];
  }
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  long long a[n + 5];
  long long x = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    x = gcd(x, a[i]);
    mp[a[i]]++;
  }
  long long mx = 0;
  for (long long i = 2; i <= 1000000; i++) {
    if (prime[i] == 0) {
      for (long long j = i; j <= 1000000; j += i) {
        ans[i] += mp[j];
        prime[j] = 1;
      }
    }
  }
  long long flag = 0;
  for (long long i = 2; i <= 1000000; i++) {
    if (ans[i] > 1) {
      flag = 1;
      break;
    }
  }
  if (!flag) {
    cout << "pairwise coprime"
         << "\n";
  } else {
    long long k = gcd_pairs(a, n);
    if (k == 0 && x == 1) {
      cout << "setwise coprime"
           << "\n";
    } else {
      cout << "not coprime"
           << "\n";
    }
  }
}
