#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
const long double PI = acos(-1);
const long double EPS = 0.0000000001;
const long long LINF = 1001002003004005006ll;
const int INF = 1001001001;
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < (long long)(n); i++) cin >> a[i];
  map<long long, long long> key;
  sort(a.begin(), a.end());
  long long tmp = a[0];
  for (int i = 2; i * i <= tmp; i++) {
    if (tmp % i == 0) key[i] += 1;
    while (tmp % i == 0) {
      tmp /= i;
    }
  }
  if (1 < tmp) {
    key[tmp] += 1;
  }
  long long res = 1;
  for (auto x : key) {
    for (long long i = 0; i < (long long)(n - 1); i++) {
      if (a[i + 1] % x.first == 0) res = 0;
    }
    if (res == 0) break;
  }
  if (res)
    cout << "pairwise coprime" << endl;
  else {
    for (auto x : key) {
      res = 1;
      for (long long i = 0; i < (long long)(n - 1); i++) {
        if (a[i + 1] % x.first != 0) res *= 0;
      }
      if (res) break;
    }
    if (res != 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
