Given [math],
[math] if [math],
[math] if [math].
If your answer is [math], input -infinity; if your answer is [math], input infinity.