#include <bits/stdc++.h>
using namespace std;
int maxGCD(vector<int> v) {
  int i;
  int vmax = 0;
  for (i = 0; i < v.size(); i++) {
    vmax = max(v[i], vmax);
  }
  vector<int> count(vmax + 5, 0);
  for (i = 0; i < v.size(); i++) {
    count[v[i]]++;
  }
  for (i = vmax; i >= 1; i--) {
    int j = i;
    int cnt = 0;
    while (j <= vmax) {
      if (count[j] >= 2) return 2;
      if (count[j] == 1) cnt++;
      j = j + i;
      if (cnt == 2) return i;
    }
  }
}
int gcd(int x, int y) {
  while (y) {
    int c = x % y;
    x = y;
    y = c;
  }
  return x;
}
int gcdV(vector<int> v) {
  int i;
  int x = v[0];
  int y = v[1];
  x = gcd(x, y);
  for (i = 2; i < v.size(); i++) {
    y = v[i];
    x = gcd(x, y);
  }
  return x;
}
int main() {
  int n, x;
  vector<int> v;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    v.push_back(x);
  }
  if (maxGCD(v) == 1)
    cout << "pairwise coprime"
         << "\n";
  else if (gcdV(v) == 1)
    cout << "setwise coprime"
         << "\n";
  else
    cout << "not coprime"
         << "\n";
  return 0;
}
