#include <bits/stdc++.h>
using namespace std;
int fact(int n) {
  int sum = 1;
  for (int i = 1; i <= n; i++) {
    sum *= i;
  }
  return sum;
}
int ncr(int n, int r) { return fact(n) / (fact(r) * fact(n - r)); }
int gcd(int a, int b) {
  for (int i = min(a, b); i >= 1; i--) {
    if (a % i == 0 && b % i == 0) {
      return i;
      break;
    }
  }
}
int main() {
  int n;
  cin >> n;
  int a[n + 10];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int onegcd = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      if (gcd(a[i], a[j]) == 1) {
        onegcd++;
      }
    }
  }
  if (onegcd == ncr(n, 2)) {
    cout << "pairwise coprime" << endl;
  } else {
    int setgcd = gcd(a[0], a[1]);
    if (n > 1) {
      for (int i = 2; i < n; i++) {
        setgcd = gcd(setgcd, a[i]);
      }
    }
    if (setgcd == 1) {
      cout << "setwise coprime" << endl;
    } else {
      cout << "not coprime" << endl;
    }
  }
  return 0;
}
