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