How to compare min(int a, int b) and min(int c, int d) ?