#include <bits/stdc++.h>
using namespace std;
struct SieveOfEratosthenes {
  vector<bool> is_prime;
  vector<long long> primes;
  SieveOfEratosthenes(long long V) {
    is_prime = vector<bool>(V + 1, true);
    primes = vector<long long>({2, 3, 5});
    for (long long i = 4; i <= V; i += 2) {
      is_prime[i] = false;
    }
    for (long long i = 9; i <= V; i += 3) {
      is_prime[i] = false;
    }
    for (long long i = 25; i <= V; i += 4) {
      is_prime[i] = false;
    }
    for (long long i = 7; i <= V; i += 2) {
      if (is_prime[i]) {
        primes.push_back(i);
        for (long long j = i * i; j <= V; j += i) {
          is_prime[j] = false;
        }
      }
    }
  }
  vector<pair<long long, long long> > factorize(long long x) {
    if (x == 1) {
      return {pair<long long, long long>(1, 1)};
    }
    auto result = vector<pair<long long, long long> >();
    for (auto p : primes) {
      long long exp = 0;
      while (x % p == 0) {
        exp++;
        x = x / p;
      }
      if (exp > 0) {
        result.push_back(pair<long long, long long>(p, exp));
      }
      if (p * p > x) {
        break;
      }
    }
    if (x > 1) {
      result.push_back(pair<long long, long long>(x, 1));
    }
    return result;
  }
};
long long gcd(long long a, long long b) {
  while (b != 0) {
    long long r = a % b;
    a = b;
    b = r;
  }
  return a;
}
string solve() {
  int N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < N; i++) {
    cin >> A[i];
  }
  auto sieve = SieveOfEratosthenes(*max_element(A.begin(), A.end()));
  auto use_prime = vector<bool>(sieve.primes.size(), false);
  long long gcd_all = A[0];
  for (int i = 1; i < N; i++) {
    gcd_all = gcd(gcd_all, A[i]);
  }
  if (gcd_all != 1) {
    return "not coprime";
  }
  for (auto x : A) {
    auto factors = sieve.factorize(x);
    for (auto [p, e] : factors) {
      if (use_prime[p] == true) {
        return "setwise coprime";
      }
      use_prime[p] = true;
    }
  }
  return "pairwise coprime";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << solve() << endl;
  return 0;
}
