#include <bits/stdc++.h>
using namespace std;
int gcd(long long int a, long long 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], r = 0;
  cin >> a[0];
  r = a[0];
  int f = 1;
  for (long long int i = 1; i < n; i++) {
    cin >> a[i];
    if (r <= a[i])
      r = gcd(a[i], r);
    else
      r = gcd(r, a[i]);
  }
  for (long long int i = 0; i < n; i++) {
    for (long long int j = i + 1; j < n; j++) {
      if (gcd(a[j], a[i]) != 1) {
        f = 0;
        break;
      }
    }
  }
  if (f == 1)
    cout << "pairwise coprime";
  else if (r == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
