#include <bits/stdc++.h>
using namespace std;
template <typename T>
using priority_queue_incr = priority_queue<T, vector<T>, greater<T> >;
template <typename TT, typename T>
T get_m(unordered_map<TT, T> &m, TT k, T default_value) {
  if (m.find(k) == m.end()) return m[k] = default_value;
  return m[k];
}
template <typename TT, typename T>
void incr_m(unordered_map<TT, T> &m, TT k) {
  if (m.find(k) == m.end()) m[k] = 0;
  m[k]++;
}
template <typename TT, typename T>
void incr_m(map<TT, T> &m, TT k) {
  if (m.find(k) == m.end()) m[k] = 0;
  m[k]++;
}
void llin(long long &a) {
  do {
    assert(!cin.eof());
    cin >> a;
    assert(!cin.fail());
  } while (0);
  ;
}
void llinl1(vector<long long> &v, long long count) {
  for (long long i = 0LL; i < count; ++i) {
    long long a;
    do {
      assert(!cin.eof());
      cin >> a;
      assert(!cin.fail());
    } while (0);
    ;
    v.push_back(a);
  }
}
void llinl2(vector<tuple<long long, long long> > &v, long long count) {
  for (long long i = 0LL; i < count; ++i) {
    long long a, b;
    do {
      assert(!cin.eof());
      cin >> a >> b;
      assert(!cin.fail());
    } while (0);
    ;
    v.push_back(tuple<long long, long long>(a, b));
  }
}
void llinl3(vector<tuple<long long, long long, long long> > &v,
            long long count) {
  for (long long i = 0LL; i < count; ++i) {
    long long a, b, c;
    do {
      assert(!cin.eof());
      cin >> a >> b >> c;
      assert(!cin.fail());
    } while (0);
    ;
    v.push_back(tuple<long long, long long, long long>(a, b, c));
  }
}
void llinl4(vector<tuple<long long, long long, long long, long long> > &v,
            long long count) {
  for (long long i = 0LL; i < count; ++i) {
    long long a, b, c, d;
    do {
      assert(!cin.eof());
      cin >> a >> b >> c >> d;
      assert(!cin.fail());
    } while (0);
    ;
    v.push_back(tuple<long long, long long, long long, long long>(a, b, c, d));
  }
}
void llina(vector<long long> &v, long long count) { llinl1(v, count); }
template <typename T>
void sort(vector<T> &v) {
  sort(v.begin(), v.end());
}
template <typename T>
void sort_reverse(vector<T> &v) {
  sort(v.begin(), v.end(), greater<T>());
}
template <typename T>
void _debug_print(T x) {
  cout << x << endl;
}
void _debug_print(const tuple<long long, long long> &x) {
  long long x1 = get<0>(x);
  long long x2 = get<1>(x);
  cout << "-- " << x1 << " -- " << x2 << endl;
}
void _debug_print(const tuple<long long, long long, long long> &x) {
  long long x1 = get<0>(x);
  long long x2 = get<1>(x);
  long long x3 = get<2>(x);
  cout << "-- " << x1 << " -- " << x2 << " -- " << x3 << endl;
}
void _debug_print(const tuple<long long, long long, long long, long long> &x) {
  long long x1 = get<0>(x);
  long long x2 = get<1>(x);
  long long x3 = get<2>(x);
  long long x4 = get<3>(x);
  cout << "-- " << x1 << " -- " << x2 << " -- " << x3 << " -- " << x4 << endl;
}
template <typename T>
void _debug_print(T xarray[], long long n) {
  for (long long i = 0LL; i < n; ++i) _debug_print(xarray[i]);
}
template <typename T>
void _debug_print(const vector<T> &xlist) {
  for (auto x : xlist) {
    cout << "-- ";
    _debug_print(x);
  }
}
template <typename T>
void _debug_print(const set<T> &xset) {
  for (auto x : xset) {
    cout << "-- ";
    _debug_print(x);
  }
}
template <typename TT, typename T>
void _debug_print(const unordered_map<TT, T> &xlist) {
  for (auto x : xlist) {
    TT k = x.first;
    T v = x.second;
    cout << "====" << endl;
    cout << "K=";
    _debug_print(k);
    cout << "V=";
    _debug_print(v);
  }
}
template <typename TT, typename T>
void _debug_print(const map<TT, T> &xlist) {
  for (auto x : xlist) {
    TT k = x.first;
    T v = x.second;
    cout << "====" << endl;
    cout << "K=";
    _debug_print(k);
    cout << "V=";
    _debug_print(v);
  }
}
void _debug_print_time(const char *prefix) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  ;
}
long long gcm(long long x, long long y) {
  while (y != 0) {
    long long z = x % y;
    x = y;
    y = z;
  }
  return x;
}
void get_divisors(vector<long long> &retlist, long long x) {
  for (long long i = 1LL; i < sqrt(x) + 3LL; ++i) {
    if (x % i == 0LL) {
      retlist.push_back(i);
      retlist.push_back(x / i);
    }
  }
}
void get_factors(vector<long long> &retlist, long long x) {
  retlist.push_back(1LL);
  for (long long i = 2LL; i < (long long)(sqrt(x)) + 3LL; ++i) {
    while (x % i == 0LL) {
      retlist.push_back(i);
      x /= i;
    }
  }
  retlist.push_back(x);
}
bool is_prime(long long x) {
  vector<long long> factors, factors2;
  get_factors(factors, x);
  for (auto factor : factors) {
    if (factor > 1) factors2.push_back(factor);
  }
  return factors2.size() == 1 && x == factors2[0];
}
void eratosthenes(set<long long> &primes, long long n) {
  bool *is_not_prime = (bool *)malloc((n + 3LL) * sizeof(bool));
  memset(is_not_prime, 0, sizeof(is_not_prime));
  for (long long v = 2LL; v < (long long)sqrt(n) + 10LL; ++v) {
    if (is_not_prime[v]) continue;
    for (long long vv = v * 2LL; vv <= n; vv += v) {
      is_not_prime[vv] = true;
    }
  }
  for (long long v = 2LL; v < n + 1LL; ++v)
    if (!is_not_prime[v]) primes.insert(v);
  free(is_not_prime);
}
unsigned long long combination(long long x, long long y) {
  if (y > x / 2LL) y = x - y;
  unsigned long long ret = 1LL;
  for (long long i = 0LL; i < y; ++i) {
    ret *= x--;
    ret /= (i + 1LL);
  }
  return ret;
}
void _main();
int main() {
  cout << setprecision(12);
  ios::sync_with_stdio(false);
  cin.tie(0);
  _main();
  return 0;
}
void _main() {
  long long n;
  llin(n);
  vector<long long> alist;
  llina(alist, n);
  long long g = alist[0];
  for (auto a : alist) g = gcm(g, a);
  if (g >= 2) {
    cout << "not coprime" << endl;
    return;
  }
  static set<long long> primes;
  eratosthenes(primes, n + 10LL);
  static bool exists[1000006] = {};
  for (auto a : alist) exists[a] = true;
  for (auto p : primes) {
    long long cnt = 0;
    for (long long pp = p; pp < 1000006; pp += p) {
      if (exists[pp]) cnt++;
      if (cnt >= 2) {
        ;
        cout << "setwise coprime" << endl;
        return;
      }
    }
  }
  cout << "pairwise coprime" << endl;
}
