#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<int> arr;
int main() {
  int n, x, temp, crazy = 1;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> x;
    if (i == 1)
      temp = x;
    else {
      temp = gcd(max(temp, x), min(temp, x));
      if (temp == 1) crazy++;
    }
  }
  if (crazy == n)
    cout << "pairwise coprime" << endl;
  else if (crazy > 1)
    cout << "setwise coprime" << endl;
  else {
    cout << "not coprime" << endl;
  }
}
