#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  a %= b;
  return gcd(b, a);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
void solve() {
  int n;
  cin >> n;
  long long arr[n], arr_prod = 1, total_gcd = 0, total_lcm = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  total_gcd = gcd(arr[0], arr[1]) % 1000000007;
  total_lcm = lcm(arr[0], arr[1]) % 1000000007;
  for (int i = 2; i < n; i++) {
    total_gcd = gcd(total_gcd, arr[i]) % 1000000007;
    total_lcm = lcm(total_lcm, arr[i]) % 1000000007;
  }
  arr_prod = accumulate(arr, arr + n, 1, multiplies<long long>()) % 1000000007;
  if (total_lcm == arr_prod) {
    cout << "pairwise coprime";
  } else if (total_lcm != arr_prod && total_gcd == 1) {
    cout << "setwise coprime";
  } else {
    cout << "not coprime";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
