import java.util.function.Function;

class Java8Tester {
   public static void main(String args[]){
      Java8Tester tester = new Java8Tester();
		
      MathOperation test = a->b->a*~a*b*~b/4;
		
      System.out.println(tester.operate(0, 0, test));
      System.out.println(tester.operate(1, 1, test));
      System.out.println(tester.operate(3, 3, test));
      System.out.println(tester.operate(4, 4, test));
      System.out.println(tester.operate(6, 7, test));
   }
	
   interface MathOperation {
      Function<Integer, Integer> operation(int a);
   }
	
   private int operate(int a, int b, MathOperation mathOperation){
      return mathOperation.operation(a).apply(b);
   }
}