#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  int r = a % b;
  while (r) {
    a = b;
    b = r;
    r = a % b;
  }
  return b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  bool flag = true;
  for (int i = 0; i < n - 1; i++)
    for (int j = i + 1; j < n; j++)
      if (gcd(a[i], a[j]) > 1) {
        flag = false;
        break;
      }
  if (flag) {
    cout << "pairwise coprime" << endl;
    return 0;
  }
  int temp = gcd(a[0], a[1]);
  for (int i = 2; i < n; i++) temp = gcd(temp, a[i]);
  if (temp == 1)
    cout << "setwise coprime" << endl;
  else
    cout << "not coprime" << endl;
  return 0;
}
