#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
const int MOD = 1e9 + 7;
double PI = 4 * atan(1);
int gcd(int a, int b) {
  while (b) b ^= a ^= b ^= a %= b;
  return a;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  long long a[n];
  bool p = 1;
  cin >> a[0];
  long long g = a[0];
  for (int i = 1; i < n; i++) {
    cin >> a[i];
    g = gcd(g, a[i]);
  }
  if (g > 1) {
    cout << "not coprime\n";
    return 0;
  }
  for (int i = 0; i < n && p == 1; i++) {
    for (int j = i + 1; j < n; j++) {
      if (gcd(a[i], a[j]) > 1) {
        p = 0;
        break;
      }
    }
  }
  if (p == 1)
    cout << "pairwise coprime\n";
  else
    cout << "setwise coprime\n";
  return 0;
}
