#include <bits/stdc++.h>
using namespace std;
const long long int LINF = 1001002003004005006ll;
const int INF = 1001001001;
const int MOD = 1000000007;
vector<int> p;
void primefact(int num, vector<int> &res) {
  res.clear();
  res.shrink_to_fit();
  for (int i : p) {
    if (num <= 1) break;
    int cnt = 0;
    while (num % i == 0) {
      cnt++;
      num /= i;
    }
    if (cnt) {
      res.push_back(i);
    }
  }
}
void sieve_of_eratosthenes(int n, vector<int> &is_prime) {
  is_prime.assign(n + 1, 1);
  is_prime[0] = is_prime[1] = 0;
  for (int i = 2; i * i <= n; ++i)
    if (is_prime[i])
      for (int k = 2 * i; k <= n; k += i) is_prime[k] = 0;
}
int main() {
  {
    vector<int> r;
    sieve_of_eratosthenes(1100000, r);
    for (int k = 2; k < 1100000; ++k) {
      if (r[k]) {
        p.push_back(k);
      }
    }
  }
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); ++i) {
    cin >> a[i];
  }
  vector<int> mp(1100000, 0);
  vector<int> r;
  for (int i = 0; i < (n); ++i) {
    primefact(a[i], r);
    for (auto b : r) {
      mp[b]++;
    }
  }
  bool ispc = true;
  for (auto b : mp) {
    if (b == n) {
      cout << "not coprime" << endl;
      return 0;
    } else if (b > 1) {
      ispc = false;
    }
  }
  if (ispc) {
    cout << "pairwise coprime" << endl;
  } else {
    cout << "setwise coprime" << endl;
  }
  return 0;
}
