#include <bits/stdc++.h>
using namespace std;
void factor(int x, vector<vector<pair<int, int>>>& primes) {
  int y = x;
  for (int i = 2; i * i <= x; i++) {
    int count = 0;
    while (x % i == 0) {
      x /= i;
      count++;
    }
    if (count > 0) {
      primes[y].push_back({i, count});
    }
  }
  if (x != 1) {
    primes[y].push_back({x, 1});
  }
}
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  vector<vector<pair<int, int>>> primes(1e6 + 5);
  unordered_map<int, bool> seen_prime;
  unordered_map<int, int> times;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    factor(v[i], primes);
  }
  bool flag = true;
  for (int i = 0; i < n; i++) {
    for (pair<int, int> p : primes[v[i]]) {
      if (seen_prime[p.first]) {
        flag = false;
        break;
      } else {
        seen_prime[p.first] = true;
      }
    }
  }
  if (flag) {
    cout << "pairwise coprime\n";
  } else {
    bool check = true;
    for (int i = 0; i < n; i++) {
      for (pair<int, int> p : primes[v[i]]) {
        times[p.first]++;
      }
    }
    for (pair<int, int> p : times) {
      if (p.second == n) {
        check = false;
        break;
      }
    }
    if (check) {
      cout << "setwise coprime\n";
    } else {
      cout << "not coprime\n";
    }
  }
  return 0;
}
