#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int findGCD(vector<int> arr, int n) {
  int result = arr[0];
  for (int i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
int main() {
  int i, j, k, m, n;
  vector<int> v;
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> k;
    v.push_back(k);
  }
  int flag = 0;
  for (i = 0; i < n - 1; i++) {
    for (j = i + 1; j < n; j++) {
      if (gcd(v[i], v[j]) != 1) {
        flag = 1;
        break;
      }
    }
    if (flag == 1) break;
  }
  if (flag == 0)
    cout << "pairwise coprime" << endl;
  else {
    int y = findGCD(v, v.size());
    if (y == 1)
      cout << "setwise coprime" << endl;
    else
      cout << "not coprime" << endl;
  }
}
