#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, min = 1001001;
  cin >> n;
  int a[n];
  int flag_odd = 0;
  for (int i = 0; i < (n); i++) {
    cin >> a[i];
    if (min > a[i]) min = a[i];
    if (a[i] % 2 == 1) flag_odd = 1;
  }
  if (flag_odd == 0) {
    cout << "not coprime" << endl;
    exit(0);
  }
  int flag = 0;
  int flag_1;
  int flag_2;
  for (int i = 3; i < (int)(sqrt(min)); i = i + 2) {
    flag_1 = 0;
    flag_2 = 0;
    for (int j = 0; j < (n); j++) {
      if (a[j] % i != 0) {
        if (flag_2 == 1) {
          flag = 1;
          break;
        }
        flag_1 = 1;
        flag_2 = 1;
      }
    }
    if (flag_1 == 0) {
      cout << "not coprime" << endl;
      exit(0);
    }
  }
  if (flag == 0) {
    cout << "pairwise coprime" << endl;
    exit(0);
  }
  if (flag == 1) cout << "setwise coprime" << endl;
}
