#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long findGCD(long long arr[], long long n) {
  long long result = arr[0];
  for (int i = 1; i < n; i++) {
    result = gcd(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
int main() {
  long long n;
  cin >> n;
  long long arr[n];
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long f1 = 1, f2 = 1;
  for (long long i = 1; i < n; i++) {
    if (arr[i] - arr[i - 1] != 1) {
      f1 = 0;
      break;
    }
  }
  long long tmp = findGCD(arr, n);
  if (tmp != 1) {
    f2 = 0;
  }
  if (f1 == 1) {
    cout << "pairwise coprime" << endl;
  } else if (f2 == 2) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
