#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int main() {
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  int g = gcd(a[0], a[1]);
  for (int i = 2; i < n; i++) g = gcd(g, a[i]);
  if (g != 1)
    cout << "not coprime";
  else {
    int count = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] % 2 == 0) count++;
    }
    if (count > 1)
      cout << "setwise coprime";
    else {
      int p = -1;
      for (int i = 0; i < n; i++) {
        for (int j = i + 1; j < n; j++) {
          if (a[j] % a[i] == 0 || a[i] % a[j] == 0) {
            p = 1;
            break;
          }
        }
      }
      if (p == 1)
        cout << "setwise coprime";
      else
        cout << "pairwise coprime";
    }
  }
  return 0;
}
