rendered paste body//Dominik Sokal
#include <iostream>
#include <map>
#include <sstream>
using namespace std;
int main()
{
int ilosc_zdjec;
cin >> ilosc_zdjec;
map<string, int> tablica;
for(int i = 0; i < ilosc_zdjec; i++)
{
int lewy_x;
int lewy_y;
int prawy_x;
int prawy_y;
cin >> lewy_x >> lewy_y >> prawy_x >> prawy_y;
for(int x = lewy_x; x <= prawy_x; x++)
{
for(int y = lewy_y; y <= prawy_y; y++)
{
stringstream klucz;
klucz << x << " " << y;
tablica[klucz.str()] += 1;
}
}
}
int max = 0;
for(map<string, int>::iterator iter = tablica.begin(); iter != tablica.end(); iter++)
{
if(max < (*iter).second)
{
max = (*iter).second;
}
}
cout << max;
}