#include <bits/stdc++.h>
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma GCC diagnostic ignored "-Wunused-const-variable"
#pragma GCC diagnostic ignored "-Wsign-compare"
using namespace std;
const long long int inf = 1e18;
const long long int mod = 1e9 + 7;
const long long int MOD = 998244353;
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...);
}
template <typename T>
bool asc(pair<T, T> &a, pair<T, T> &b) {
  if (a.first == b.first) {
    return a.second > b.second;
  }
  return a.first < b.first;
}
template <typename T>
bool desc(pair<T, T> &a, pair<T, T> &b) {
  if (a.first == b.first) {
    return a.second > b.second;
  }
  return a.first > b.first;
}
template <typename T>
T power(T a, T b) {
  if (b == 0) return 1;
  if (b == 1)
    return a;
  else {
    T res = (power(a, b / 2));
    if (b % 2) {
      return (res * res * a);
    } else {
      return res * res;
    }
  }
}
template <typename T>
T power(T a, T b, T modulo) {
  if (b == 0) return 1;
  if (b == 1)
    return a;
  else {
    T res = (power(a, b / 2, modulo) % modulo);
    if (b % 2) {
      return ((((res % modulo) * (res % modulo)) % modulo) * (a % modulo)) %
             modulo;
    } else {
      return ((res % modulo) * (res % modulo)) % modulo;
    }
  }
}
template <typename T>
T gcd(T a, T b) {
  if (b == 0) {
    return a;
  }
  return gcd(b, a % b);
}
template <typename T>
T lcm(T p, T q) {
  return (p * q) / gcd<T>(p, q);
}
template <typename T>
void primefactorise(T n, vector<T> &vec) {
  while (n % 2 == 0) {
    vec.emplace_back(2);
    n = n / 2;
  }
  for (int i = 3; i <= sqrt(n); i = i + 2) {
    while (n % i == 0) {
      vec.emplace_back(i);
      n = n / i;
    }
  }
  if (n > 2) {
    vec.emplace_back(n);
  }
}
template <typename T>
void all_factor(T n, vector<T> &vec) {
  for (auto i = 1; i <= sqrt(n); ++i) {
    if (n % i == 0) {
      vec.emplace_back(i);
      if (i != (n / i)) {
        vec.emplace_back(n / i);
      }
    }
  }
}
long long mod_inv(long long a) {
  return (power<long long>(a, mod - 2, mod)) % mod;
}
void factorial(vector<long long int> &fact, long long n) {
  fact.resize(n + 1, 1);
  fact[0] = 1;
  fact[1] = 1;
  for (int i = 2; i <= n; ++i) {
    fact[i] = ((fact[i - 1] % mod) * (i % mod)) % mod;
  }
}
long long ncr(long long n, long long r, vector<long long int> fact) {
  if (n < r or n < 0 or r < 0) {
    return 0;
  }
  return fact[n] % mod * mod_inv(fact[r]) % mod * mod_inv(fact[n - r]) % mod %
         mod % mod;
}
int main() {
  std::chrono::time_point<std::chrono::high_resolution_clock> start_timer,
      end_timer;
  start_timer = std::chrono::high_resolution_clock::now();
  bool show_time = false;
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n;
  cin >> n;
  vector<long long int> v(n + 1);
  for (auto i = 1; i <= n; i++) {
    cin >> v[i];
  };
  vector<long long int> l(n + 1, 0);
  l[n] = v[n];
  for (long long i = n - 1; i > 0; i--) {
    l[i] = lcm<long long>(l[i + 1], v[i]);
  }
  long long a = 1;
  for (long long i = 1; i < n; ++i) {
    if (gcd<long long>(v[i], l[i + 1]) != 1) {
      a = 0;
      break;
    }
  }
  if (a) {
    cout << (("pairwise coprime")) << "\n";
    ;
    return 0;
  }
  long long g = v[1];
  for (int i = 2; i <= n; ++i) {
    g = gcd<long long>(g, v[i]);
  }
  if (g == 1) {
    cout << (("setwise coprime")) << "\n";
    ;
  } else {
    cout << (("not coprime")) << "\n";
    ;
  }
  end_timer = std::chrono::high_resolution_clock::now();
  long long elapsed_time =
      std::chrono::duration_cast<std::chrono::milliseconds>(end_timer -
                                                            start_timer)
          .count();
  if (show_time) {
    cout << "\nElapsed Time: " << elapsed_time << "ms\n";
  }
  return 0;
}
