#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
vector<char*> tokenizer(const char* args) {
  char* token = new char[111];
  strcpy(token, args);
  token = strtok(token, ", ");
  vector<char*> v({token});
  while (token = strtok(NULL, ", ")) v.push_back(token);
  return reverse(v.begin(), v.end()), v;
}
void debugg(vector<char*> args) { cerr << "\b\b "; }
template <typename Head, typename... Tail>
void debugg(vector<char*> args, Head H, Tail... T) {
  debug() << " [" << args.back() << ": " << H << "] ";
  args.pop_back();
  debugg(args, T...);
}
const int MOD = 1e9 + 7;
const int infi = INT_MAX;
const long long infll = LLONG_MAX;
const int dx4[] = {0, -1, 0, 1};
const int dy4[] = {-1, 0, 1, 0};
const int dx8[] = {-1, -1, -1, 0, 1, 1, 1, 0};
const int dy8[] = {-1, 0, 1, 1, 1, 0, -1, -1};
const long double PI = 3.1415926535897932384626;
long long power(long long a, long long b) {
  long long ans = 1;
  while (b > 0) {
    if (b & 1) ans *= a;
    a *= a;
    b >>= 1;
  }
  return ans;
}
long long pow_mod(long long a, long long b, long long m) {
  long long ans = 1;
  while (b > 0) {
    if (b & 1) ans = (ans * a) % m;
    a = (a * a) % m;
    b >>= 1;
  }
  return ans % m;
}
bool isprime(long long num) {
  for (long long i = 2; i * i <= num; ++i) {
    if (num % i == 0) return false;
  }
  return true;
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return ((a / gcd(a, b)) * b); }
long long cel(long long x1, long long y1) {
  if ((x1) <= 0) return (x1) / (y1);
  return (((x1) / (y1)) + (((x1) % (y1)) != 0));
}
void solve(int test_case) {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (long long& i : a) cin >> i;
  long long prd = 1;
  long long chk = 1;
  for (int i = 0; i < n; ++i) {
    prd *= a[i];
    chk = lcm(chk, a[i]);
  }
  if (chk == prd) {
    cout << "pairwise coprime\n";
    return;
  }
  long long g = a[0];
  for (int i = 1; i < n; ++i) {
    g = gcd(g, a[i]);
  }
  if (g == 1) {
    cout << "setwise coprime\n";
    return;
  }
  cout << "not coprime\n";
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int tc = 1;
  for (int t = 1; t <= tc; ++t) {
    solve(t);
  }
  return 0;
}
