#include <bits/stdc++.h>
using namespace std;
long long int a[1000000];
bool t = true;
int gcd(int c, int d) { return d == 0 ? c : gcd(c, c % d); }
int main() {
  int n, min = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] < min) min = a[i];
  }
  int k = 0, b = 0, x = 1, o;
  while (x == min) {
    x++;
    for (int i = 1; i <= n; i++)
      if (a[i] % x == 0) k++;
    if (k = n) {
      cout << "not coprime";
      x = min;
      t = false;
    }
  }
  if (t)
    for (int i = 1; i < n; i++) {
      o = gcd(a[i], a[i + 1]);
      if (t)
        if (o > 1) {
          t = false;
          cout << "setwise coprime";
        }
    }
  if (t) cout << "pairwise coprime";
  return 0;
}
