#include <stdio.h>
#include <math.h>

int main(){
	int a = 908846059;
	int b = 746193302;
	int c = 4149036912;

	int x;
	scanf("%d", &x);

	printf("%d\n", a*x*x + b*x + c);
	if(a*x*x + b*x + c == 0){
		printf("hurray! %d\n", x);
	}
	else{
		printf("zoinks!\n");
	}
}
