#include <bits/stdc++.h>
using namespace std;
int gcd(int x, int y) { return (x % y) ? gcd(y, x % y) : y; }
long long lcm(long long x, long long y) { return x / gcd(x, y) * y; }
using Graph = vector<vector<int>>;
long long inf = 300000000000000000;
const double PI = 3.14159265358979323846;
int main() {
  int n;
  cin >> n;
  vector<int> k(1000001, 0);
  int u[n];
  for (int i = 0; i < (int)(n); i++) cin >> u[i];
  int g = u[0];
  for (int i = 0; i < (int)(n - 1); i++) {
    g = gcd(g, u[i + 1]);
  }
  set<int> s;
  s.insert(2);
  for (int i = 0; i < (int)(997); i++) {
    int y = i + 3;
    int v = 0;
    for (int j = 0; j < (int)(y - 2); j++) {
      if (y % (j + 2) == 0) v++;
    }
    if (v == 0) s.insert(y);
  }
  for (int i = 0; i < (int)(n); i++) {
    int a = u[i];
    for (int j : s) {
      if (j == 0) continue;
      if (a % (j + 1) == 0) {
        k[j + 1]++;
        while (a % (j + 1) == 0) {
          a /= (j + 1);
        }
      }
    }
    if (a > 1) k[a]++;
  }
  int x = 0;
  for (int i = 0; i < (int)(1000001); i++) {
    x = max(x, k[i]);
  }
  if (x <= 1) {
    cout << "pairwise coprime" << endl;
  } else if (g == 1) {
    cout << "setwise coprime" << endl;
  } else
    cout << "not coprime" << endl;
}
