#include <bits/stdc++.h>
using namespace std;
long long MOD = 1e9 + 7;
unordered_map<long long, long long> mp;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
bool solve1(long long arr[], long long n) {
  for (long long i = 0; i < n; i++) {
    for (long long k = 2; k * k <= arr[i]; k++) {
      if (arr[i] % k == 0) {
        if (mp[k]) {
          return 0;
        }
        if (arr[i] / k == k) {
          mp[k]++;
        } else {
          mp[k]++;
          if (mp[arr[i] / k]) {
            return 0;
          }
          mp[arr[i] / k]++;
        }
      }
    }
  }
  return 1;
}
bool solve2(long long arr[], long long n) {
  long long res = arr[0];
  for (int i = 1; i < n; i++) {
    res = gcd(res, arr[i]);
    if (res == 1) {
      return 1;
    }
  }
  return 0;
}
int main() {
  long long n;
  cin >> n;
  long long arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  if (solve1(arr, n)) {
    cout << "pairwise coprime" << endl;
  } else if (solve2(arr, n)) {
    cout << "setwise coprime" << endl;
  } else {
    cout << "not coprime" << endl;
  }
}
