#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a;
  bool p1 = true;
  bool p2 = true;
  int big = 0;
  for (int i = 0; i < n; i++) {
    a.push_back(0);
    cin >> a[i];
    big = max(big, a[i]);
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < n - 1; i++) {
    if (a[i] == a[i + 1] && a[i] != 1) {
      p1 = false;
      break;
    }
  }
  p2 = false;
  for (int i = 1; i < n; i++) {
    if (a[i] != a[0]) {
      p2 = true;
      break;
    }
  }
  vector<int> p;
  p.push_back(2);
  p.push_back(3);
  bool prime;
  int x;
  int s;
  for (int i = 5; i <= sqrt(big); i = i + 2) {
    prime = true;
    x = 1;
    s = sqrt(i);
    while (true) {
      if (p[x] > s) {
        break;
      }
      if (i % p[x] == 0) {
        prime = false;
        break;
      }
      x++;
    }
    if (prime) {
      p.push_back(i);
    }
  }
  for (int i = 0; i < p.size(); i++) {
    x = 0;
    for (int j = 0; j < n; j++) {
      if (a[j] >= p[i] && a[j] % p[i] == 0) {
        x++;
      }
    }
    if (x > 1) {
      p1 = false;
    }
    if (x == n) {
      p2 = false;
      break;
    }
  }
  if (p1) {
    cout << "pairwise coprime" << endl;
  } else if (p2) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
  cin.sync();
  cin.get();
  return 0;
}
