#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];
    r = gcd(a[i], r);
  }
  for (long long int i = 0; i < n - 1; i++) {
    if (gcd(a[i + 1], a[i]) != 1) {
      f = 0;
      break;
    }
  }
  if (f == 1)
    cout << "pairwise coprime";
  else if (r == 1)
    cout << "setwise coprime";
  else
    cout << "not coprime";
}
