#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;
  cin >> n;
  int arr[n + 1];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  sort(arr, arr + n);
  int result = gcd(arr[n - 2], arr[n - 1]);
  bool pcoprime = true;
  if (result != 1) pcoprime = false;
  for (int i = n - 3; i >= 0; i--) {
    if (result == 1) {
      break;
    } else {
      result = gcd(min(result, arr[i]), max(result, arr[i]));
      if (result != 1) pcoprime = false;
    }
  }
  if (pcoprime && result != 1) {
    cout << "pairwise coprime\n";
  } else if (result == 1) {
    cout << "setwise coprime\n";
  } else {
    cout << "not coprime\n";
  }
  return 0;
}
