#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxn = 100001;
#define x first
#define y second
int t,n;
pair<int, int> point[maxn];
bool check(int r)
{
int xL = -100001, xR = 100001;
int yL = -100001, yR = 100001;
int zL = (-100001) << 1, zR = 100001 << 1;
for(int i = 0; i < n; i++)
{
xL = max(xL, point[i].x - r);
xR = min(xR, point[i].x + r);
yL = max(yL, point[i].y - r);
yR = min(yR, point[i].y + r);
zL = max(zL, point[i].x + point[i].y - r);
zR = min(zR, point[i].x + point[i].y + r);
}
if(xL > xR || yL > yR) return 0;
zL = max(zL, xL + yL);
zR = min(zR, xR + yR);
return zL <= zR;
}
int main()
{
std::cin >> t;
int cas = 0;
while(t--)
{
cas++;
std::cin >> n;
for(int i = 0; i < n; i++) {
std::cin >> point[i].x >> point[i].y;
}
int L = 0, R = 100001;
while(L < R)
{
int mid = (L + R) >> 1;
if(check(mid)) R = mid;
else {
L = mid + 1;
}
}
// std::cout << "L=" << L << '\n';
ll ans = L * (L + 1LL) * 3 + 1;
printf("Case %d: %lld\n", cas, ans);
}
return 0;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp0eXBlZGVmIGxvbmcgbG9uZyBsbDsKY29uc3QgaW50IG1heG4gPSAxMDAwMDE7CgojZGVmaW5lIHggZmlyc3QKI2RlZmluZSB5IHNlY29uZAoKaW50IHQsbjsKcGFpcjxpbnQsIGludD4gcG9pbnRbbWF4bl07Cgpib29sIGNoZWNrKGludCByKQp7CiAgICBpbnQgeEwgPSAtMTAwMDAxLCB4UiA9IDEwMDAwMTsKICAgIGludCAgeUwgPSAtMTAwMDAxLCB5UiA9IDEwMDAwMTsKICAgIGludCB6TCA9ICgtMTAwMDAxKSA8PCAxLCB6UiA9IDEwMDAwMSA8PCAxOwogICAgZm9yKGludCBpID0gMDsgaSA8IG47IGkrKykKICAgIHsKICAgICAgICB4TCA9IG1heCh4TCwgcG9pbnRbaV0ueCAtIHIpOwogICAgICAgIHhSID0gbWluKHhSLCBwb2ludFtpXS54ICsgcik7CiAgICAgICAgeUwgPSBtYXgoeUwsIHBvaW50W2ldLnkgLSByKTsKICAgICAgICB5UiA9IG1pbih5UiwgcG9pbnRbaV0ueSArIHIpOwogICAgICAgIHpMID0gbWF4KHpMLCBwb2ludFtpXS54ICsgcG9pbnRbaV0ueSAtIHIpOwogICAgICAgIHpSID0gbWluKHpSLCBwb2ludFtpXS54ICsgcG9pbnRbaV0ueSArIHIpOwogICAgfQogICAgaWYoeEwgPiB4UiB8fCB5TCA+IHlSKSByZXR1cm4gMDsKICAgIHpMID0gbWF4KHpMLCB4TCArIHlMKTsKICAgIHpSID0gbWluKHpSLCB4UiArIHlSKTsKICAgIHJldHVybiB6TCA8PSB6UjsKfQppbnQgbWFpbigpCnsKICAgIHN0ZDo6Y2luID4+IHQ7CiAgICBpbnQgY2FzID0gMDsKICAgIHdoaWxlKHQtLSkKICAgIHsKICAgICAgICBjYXMrKzsKICAgICAgICBzdGQ6OmNpbiA+PiBuOwogICAgICAgIGZvcihpbnQgaSA9IDA7IGkgPCBuOyBpKyspIHsKICAgICAgICAgICAgc3RkOjpjaW4gPj4gcG9pbnRbaV0ueCA+PiBwb2ludFtpXS55OwogICAgICAgIH0KICAgICAgICBpbnQgTCA9IDAsIFIgPSAxMDAwMDE7CiAgICAgICAgd2hpbGUoTCA8IFIpCiAgICAgICAgewogICAgICAgICAgICBpbnQgbWlkID0gKEwgKyBSKSA+PiAxOwogICAgICAgICAgICBpZihjaGVjayhtaWQpKSBSID0gbWlkOwogICAgICAgICAgICBlbHNlIHsKICAgICAgICAgICAgICAgIEwgPSBtaWQgKyAxOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8vIHN0ZDo6Y291dCA8PCAiTD0iIDw8IEwgPDwgJ1xuJzsKICAgICAgICBsbCBhbnMgPSBMICogKEwgKyAxTEwpICogMyArIDE7CiAgICAgICAgcHJpbnRmKCJDYXNlICVkOiAlbGxkXG4iLCBjYXMsIGFucyk7CiAgICB9CiAgICByZXR1cm4gMDsKfQo=