#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int a[1000010];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int x = gcd(a[1], a[2]);
  for (int i = 3; i <= n; i++) x = gcd(x, a[i]);
  if (x != 1)
    cout << "not coprime" << endl;
  else {
    for (int i = 1; i < n; i++) {
      for (int j = i + 1; j <= n; j++)
        if (gcd(a[i], a[j]) != 1) {
          cout << "setwise coprime" << endl;
          return 0;
        }
    }
    cout << "pairwise coprime" << endl;
  }
  return 0;
}
