#include <iostream>
using namespace std;
int main()
{
int a, b;
int t;
cin >> t;
while (t--) {
cin >> a >> b;
}
cout << (a / 3) * (b / 3); "\n";