/*
 
*/ 
// #pragma GCC optimize("Ofast")
// #pragma GCC target("avx,avx2,fma")
#include <iostream>
#include <iomanip>
#include <sstream>
#include <fstream>
#include <string>
#include <cstring>
#include <vector>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <queue>
#include <stack>
#include <deque>
#include <algorithm>
#include <numeric>
#include <cmath>
#include <utility>
 
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
 
#define LSOne(S) (S & (-S))
#define EPS 1e-9
 
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int, int> pi;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<double, double> pd;
typedef tree<pi, null_type, less<pi>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

const int MAXNUM = 1e6;

int main()
{
    std::ios::sync_with_stdio(false);
    cin.tie(0); // FOR QUERY PROBLEM DON'T FORGET TO UNCOMMENT THIS
    int n;
    cin >> n;
    vector<int> vec(n);
    vector<char> has(MAXNUM);
    int allg = 0;
    for(auto& v : vec)
    {
        cin >> v;
        has[v] = true;
        allg = __gcd(allg, v);
    }

    for(int g = MAXNUM; g > 1; --g)
    {
        int cnt = 0;
        for(int num = g; num <= MAXNUM; num += g)
        {
            cnt += has[num];
            if(cnt > 1)
            {
                if(allg == 1)
                {
                    cout << "setwise coprime\n";
                }
                else
                {
                    cout << "not coprime\n";
                }
                return 0;
            }
        }
    }
    cout << "pairwise coprime\n";
    return 0;
}
 
/*
 
*/  