Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
    long long int ll;
    ll n;
    cin>>n;
    ll a[n];
    map<ll,ll>mp;
    for(int i = 0 ;  i <n ; i++){
        cin>>a[i];
        for(int j = 2 ; j*j <= a[i] ; j++){
            if(a[i]%j == 0){
                mp[j]++;
                if(a[i]/j != j){
                    mp[a[i]/j]++;
                }
            }
        }
    }
    int f = 0;
    for(auto i:mp){
        if(i.second >= 2){
            f = 1;
          	break;
        }
    }
    if(f == 1){
        ll gc = a[0];
        for(int i = 1 ; i < n ; i++){
            gc = __gcd(a[i],gc);
        }
        if(gc == 1){
            cout<<"setwise coprime"<<endl;
        }
        else{
            cout<<"not coprime"<<endl;
        }
    }
    else{
        cout<<"pairwise coprime"<<endl;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:7: error: expected ';' before 'n'
    5 |     ll n;
      |       ^~
      |       ;
a.cc:6:10: error: 'n' was not declared in this scope; did you mean 'yn'?
    6 |     cin>>n;
      |          ^
      |          yn
a.cc:7:7: error: expected ';' before 'a'
    7 |     ll a[n];
      |       ^~
      |       ;
a.cc:8:14: error: type/value mismatch at argument 1 in template parameter list for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
    8 |     map<ll,ll>mp;
      |              ^
a.cc:8:14: note:   expected a type, got 'll'
a.cc:8:14: error: type/value mismatch at argument 2 in template parameter list for 'template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map'
a.cc:8:14: note:   expected a type, got 'll'
a.cc:8:14: error: template argument 3 is invalid
a.cc:8:14: error: template argument 4 is invalid
a.cc:10:14: error: 'a' was not declared in this scope
   10 |         cin>>a[i];
      |              ^
a.cc:13:19: error: invalid types 'int[int]' for array subscript
   13 |                 mp[j]++;
      |                   ^
a.cc:21:16: error: 'begin' was not declared in this scope
   21 |     for(auto i:mp){
      |                ^~
a.cc:21:16: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:166,
                 from a.cc:1:
/usr/include/c++/14/valarray:1238:5: note:   'std::begin'
 1238 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/14/filesystem:53,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:200:
/usr/include/c++/14/bits/fs_dir.h:608:3: note:   'std::filesystem::__cxx11::begin'
  608 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
a.cc:21:16: error: 'end' was not declared in this scope
   21 |     for(auto i:mp){
      |                ^~
a.cc:21:16: note: suggested alternatives:
/usr/include/c++/14/valarray:1265:5: note:   'std::end'
 1265 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
/usr/include/c++/14/bits/fs_dir.h:613:3: note:   'std::filesystem::__cxx11::end'
  613 |   end(recursive_directory_iterator) noexcept
      |   ^~~
a.cc:28:11: error: expected ';' before 'gc'
   28 |         ll gc = a[0];
      |           ^~~
      |           ;
a.cc:30:13: error: 'gc' was not declared in this scope
   30 |             gc = __gcd(a[i],gc);
      |             ^~
a.cc:30:24: error: 'a' was not declared in this scope
   30 |             gc = __gcd(a[i],gc);
      |                        ^
a.cc:32:12: error: 'gc' was not declared in this scope
   32 |         if(gc == 1){
      |            ^~