#include <bits/stdc++.h>
using namespace std;
long long int gcd(long long int x, long long int y) {
  if (y == 0) {
    return x;
  }
  return gcd(y, x % y);
}
long long int lcm(long long int x, long long int y) {
  return (x * y) / gcd(x, y);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, a, p = 1;
  cin >> n;
  vector<long long int> x;
  for (long long int i = 0; i < n; i++) {
    cin >> a;
    x.push_back(a);
    p *= a;
  }
  long long int g = x[0], l = x[0];
  for (long long int i = 1; i < n; i++) {
    g = gcd(g, x[i]);
    if (g == 1) {
      break;
    }
  }
  if (g != 1) {
    cout << "not coprime" << endl;
  } else {
    for (long long int i = 1; i < n; i++) {
      l = lcm(l, x[i]);
    }
    if (l == p) {
      cout << "pairwise coprime" << endl;
    } else {
      cout << "setwise coprime" << endl;
    }
  }
  return 0;
}
