#include <bits/stdc++.h>
using namespace std;
inline void print() { cout << endl; }
template <typename First, typename... Rest>
void print(const First &first, const Rest &...rest) {
  cout << first << ' ';
  print(rest...);
}
template <typename T>
void print(const vector<T> &v) {
  for (auto e : v) cout << e << ' ';
  cout << endl;
}
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  return b ? gcd(b, a % b) : a;
}
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
vector<long long> enum_divisors(long long N) {
  vector<long long> res;
  for (long long i = 1; i * i <= N; ++i) {
    if (N % i == 0) {
      res.push_back(i);
      if (N / i != i) res.push_back(N / i);
    }
  }
  sort(res.begin(), res.end());
  return res;
}
vector<long long> sieve(long long N) {
  vector<long long> res;
  vector<long long> is_prime(N + 1, true);
  is_prime[0] = is_prime[1] = false;
  for (long long i = 2; i <= N; i++) {
    if (is_prime[i]) {
      res.push_back(i);
      for (long long j = 2 * i; j <= N; j += i) {
        is_prime[j] = false;
      }
    }
  }
  return res;
}
void solve() {
  int N;
  cin >> N;
  vector<int> A(N);
  int g = 0;
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    g = gcd(g, A[i]);
  }
  if (g != 1) {
    cout << "not coprime" << '\n';
    return;
  }
  vector<long long> primes = sieve(1000);
  for (long long prime : primes) {
    bool flag = false;
    for (int i = 0; i < N; i++) {
      if (A[i] % prime == 0) {
        if (flag) {
          cout << "setwise coprime" << '\n';
          return;
        } else {
          flag = true;
        }
      }
    }
  }
  cout << "pairwise coprime" << '\n';
}
int main() {
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  solve();
  return 0;
}
