#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long inf = 1e18;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < (n); i++) cin >> a[i];
  bool st = true, pr = true;
  sort(a.begin(), a.end());
  int i = 2;
  int num = a[0];
  vector<int> p;
  while (i * i <= num) {
    if (num % i == 0) {
      while (true) {
        num /= i;
        if (num % i != 0) break;
      }
      p.push_back(i);
    }
    i++;
  }
  if (num != 1) p.push_back(num);
  sort(p.begin(), p.end());
  num = p.size();
  vector<bool> pp(num);
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < num; j++) {
      if (pp[j]) continue;
      if (a[i] % p[j] != 0) pp[j] = true;
    }
  }
  for (int i = 0; i < (num); i++)
    if (!pp[i]) st = false;
  if (n > 79000)
    pr = false;
  else {
    vector<int> vv(10000000);
    for (int i = 0; i < n; i++) {
      int j = 2;
      while (j * j <= a[i]) {
        if (a[i] % j == 0) {
          while (true) {
            a[i] /= j;
            if (a[i] % j != 0) break;
          }
          if (vv[j]) {
            pr = false;
            break;
          }
          vv[j] = true;
        }
        j++;
      }
      if (a[i] != 1) {
        if (vv[a[i]]) {
          pr = false;
          break;
        }
        vv[a[i]] = true;
      }
    }
  }
  if (a[n - 1] == 1) pr - true;
  if (pr)
    cout << "pairwise coprime" << endl;
  else if (st)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
