#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
int gcd(int a, int b) {
  while (b) {
    int c = a % b;
    a = b;
    b = c;
  }
  return a;
}
int main() {
  ios::sync_with_stdio(false);
  int n, a[200005] = {}, g = 0;
  vector<int> b;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i], g = gcd(g, a[i]);
  for (int i = 0; i < n; i++)
    if (a[i] > 1) b.push_back(a[i]);
  if (g != 1)
    cout << "not";
  else {
    if (b.size() > 28)
      cout << "setwise";
    else {
      bool z = 0;
      for (int i = 0; i < b.size(); i++)
        for (int j = 0; j < i; j++)
          if (gcd(b[i], b[j]) != 1) z = 1;
      if (z)
        cout << "setwise";
      else
        cout << "pairwise";
    }
  }
  cout << " coprime";
}
