#include <bits/stdc++.h>
using namespace std;
int a[1000009], mobius[1000009], cnt[1000009], mul[1000009];
bool primes[1000009];
vector<int> prime;
int gcd(int a, int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  mobius[1] = 1;
  primes[1] = true;
  for (int i = 2; i < 1000009; i++) {
    if (!primes[i]) {
      mobius[i] = -1;
      prime.push_back(i);
    }
    for (int j = 0; (j < prime.size()) && (i * prime[j] < 1000009); j++) {
      primes[i * prime[j]] = true;
      if (i % prime[j] == 0) {
        mobius[i * prime[j]] = 0;
        break;
      }
      mobius[i * prime[j]] = mobius[i] * -1;
    }
  }
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    cnt[a[i]]++;
  }
  int result = a[1];
  for (int i = 2; i <= n; i++) {
    result = gcd(result, a[i]);
  }
  if (result == 1) {
    cout << "setwise coprime\n";
    return 0;
  }
  for (int i = 1; i <= 1000000; i++) {
    for (int j = 1; j * i <= 1000000; j++) {
      mul[i] += cnt[j * i];
    }
  }
  long long fans = 0;
  for (int i = 1; i <= 1000000; i++) {
    long long tans = mul[i];
    tans = tans * (tans - 1);
    tans /= 2;
    fans += (mobius[i] * tans);
  }
  long long total = n * (n - 1);
  total /= 2;
  if (total == fans) {
    cout << "pairwise coprime\n";
  } else if (result == 1) {
    cout << "setwise coprime\n";
    return 0;
  } else {
    cout << "not coprime";
  }
}
