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