#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
map<long long int, long long int> primes;
void factor(long long int n) {
  map<long long int, long long int> m;
  for (long long int i = 2; i * i <= n; i++) {
    while (n % i == 0) {
      m[i]++;
      n = n / i;
    }
  }
  if (n != 1) {
    primes[n] = 1;
  }
  for (auto x : m) {
    primes[x.first]++;
  }
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long int n;
  cin >> n;
  vector<long long int> arr(n);
  for (long long int i = 0; i < n; i++) {
    cin >> arr[i];
    factor(arr[i]);
  }
  string ans = "pairwise coprime";
  for (auto x : primes) {
    if (x.second == n) {
      ans = "not coprime";
      break;
    }
    if (x.second != 1) {
      ans = "setwise coprime";
    }
  }
  cout << ans << endl;
  return 0;
}
