Language: C++

#include<bits/stdc++.h>
using namespace std;
#define forr(i,a,n)     for(long long int i=a; i<n; i++)
#define loop(i,a,n)     for(long long int i=a; i>=n; i--) 

int main()
{
	ios_base :: sync_with_stdio(false),cin.tie(NULL);
	
	int a;
	cin>>a;
	vector<pair<long long int, pair<long long int, long long int>> w,v;
	forr(i, 0, a)
	{
		long long int x, y;
		cin>>x>>y;
		v.push_back({x+y, {x, y}});
		w.push_back({x-y, {x, y}});
	}
	sort(v.begin(), v.end());
	sort(w.begin(), w.end());
	cout<<max({(abs(v[0].second.first-v[a-1].second.first)+abs(v[0].second.second-v[a-1].second.second)), (abs(w[0].second.first-w[a-1].second.first)+abs(w[0].second.second-w[a-1].second.second))});
		
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:74: error: template argument 1 is invalid
   12 |         vector<pair<long long int, pair<long long int, long long int>> w,v;
      |                                                                          ^
a.cc:12:74: error: template argument 2 is invalid
a.cc:17:17: error: 'v' was not declared in this scope
   17 |                 v.push_back({x+y, {x, y}});
      |                 ^
a.cc:18:17: error: 'w' was not declared in this scope
   18 |                 w.push_back({x-y, {x, y}});
      |                 ^
a.cc:20:14: error: 'v' was not declared in this scope
   20 |         sort(v.begin(), v.end());
      |              ^
a.cc:21:14: error: 'w' was not declared in this scope
   21 |         sort(w.begin(), w.end());
      |              ^
a.cc:22:18: error: no matching function for call to 'max(<brace-enclosed initializer list>)'
   22 |         cout<<max({(abs(v[0].second.first-v[a-1].second.first)+abs(v[0].second.second-v[a-1].second.second)), (abs(w[0].second.first-w[a-1].second.first)+abs(w[0].second.second-w[a-1].second.second))});
      |               ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/algorithm:60,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:51,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_algobase.h:257:5: note: candidate: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
  257 |     max(const _Tp& __a, const _Tp& __b)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:257:5: note:   candidate expects 2 arguments, 1 provided
/usr/include/c++/14/bits/stl_algobase.h:303:5: note: candidate: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
  303 |     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algobase.h:303:5: note:   candidate expects 3 arguments, 1 provided
In file included from /usr/include/c++/14/algorithm:61:
/usr/include/c++/14/bits/stl_algo.h:5706:5: note: candidate: 'template<class _Tp> constexpr _Tp std::max(initializer_list<_Tp>)'
 5706 |     max(initializer_list<_Tp> __l)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5706:5: note:   template argument deduction/substitution failed:
/usr/include/c++/14/bits/stl_algo.h:5716:5: note: candidate: 'template<class _Tp, class _Compare> constexpr _Tp std::max(initializer_list<_Tp>, _Compare)'
 5716 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
/usr/include/c++/14/bits/stl_algo.h:5716:5: note:   candidate expects 2 arguments, 1 provided