#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long inv(long long i) {
  if (i == 1) return 1;
  return (mod - ((mod / i) * inv(mod % i)) % mod) % mod;
}
inline void fastio() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
}
long long gcd(long long a, long long b) {
  if (a > b) {
    if (b == 0) return a;
    return gcd(b, a % b);
  } else {
    if (a == 0) return b;
    return gcd(b % a, a);
  }
}
long long findlcm(long long arr[], long long n) {
  long long ans = arr[0];
  for (int i = 1; i < n; i++) ans = (((arr[i] * ans)) / (gcd(arr[i], ans)));
  return ans;
}
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;
}
void solve() {
  long long n;
  cin >> n;
  long long arr[n];
  long long product = 1;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    product *= arr[i];
  }
  long long gcd1 = findGCD(arr, n);
  long long lcm1 = findlcm(arr, n);
  if (product == lcm1) {
    cout << "pairwise coprime"
         << "\n";
  } else if (gcd1 == 1) {
    cout << "setwise coprime"
         << "\n";
  } else {
    cout << "not coprime"
         << "\n";
  }
}
int main() {
  fastio();
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
