#include <cstdio>
using namespace std;

typedef long long int LLI;

LLI d;

int main() {
  while (1) {
    if (scanf("%lld", &d) != 1) break;
    
    LLI ans = 0;
    for (LLI i=0; i<600; i+=d) {
      ans += i*i*d;
    }
    printf("%lld\n", ans);
  }
}
#include <iostream>
#include <vector>
#include <cmath>

using namespace std;

int f(int);
int integral(int);

int main(void) {
	int a, b;

	while(cin >> a >> b) {
		cout << integral(a) << endl; 
		cout << integral(b) << endl;
	}
	return 0;
}
int integral(int d){
	int n = 600 / d;
	int sum = 0;

	for (int i = 1; i < n; i++) {
		sum = sum + f(d * i) * d;
	}

	return sum;
}

int f(int a) {
	return a * a;
}