#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
long long hcf(long long a, long long b) {
  if (!a)
    return (b);
  else
    return (hcf(b % a, a));
}
long long findGCD(vector<long long> arr, long long n) {
  long long result = arr[0];
  for (long long i = 1; i < n; i++) {
    result = hcf(arr[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t{}, T{};
  t = 1;
  while (t--) {
    long long n{}, m{}, ans{}, k{}, a{}, b{}, c{}, f{1};
    cin >> n;
    std::vector<long long> v(n);
    for (long long i = 0; i < n; ++i) {
      cin >> v[i];
    }
    f = 0;
    for (int i = 2; i < 1000; ++i) {
      c = 0;
      for (int j = 0; j < n; ++j) {
        if (v[j] % i == 0) {
          ++c;
        }
        if (c > 1) {
          f = 1;
          break;
        }
      }
      if (f) break;
    }
    if (f) {
      a = findGCD(v, n);
      if (a == 1) {
        cout << "setwise coprime\n";
        return 0;
      } else {
        cout << "not coprime\n";
        return 0;
      }
    } else {
      cout << "pairwise coprime\n";
      return 0;
    }
  }
  return 0;
}
