# BULLBEAR - Editorial

Author: tejas10p
Testers: IceKnight1093, tabr
Editorialist: IceKnight1093

300

None

# PROBLEM:

Chef bought a stock at value X and sold it at value Y. Did he make a profit, loss, or neither?

# EXPLANATION:

This task is solved by simple case analysis:

• If X \gt Y, Chef spent more than he gained, so he made a loss.
• If X \lt Y, Chef spent less than he gained, so he made a profit.
• If X = Y, Chef’s spending equals his gains, so it was a neutral deal.

Check all three cases using if conditions and print the appropriate answer.

# TIME COMPLEXITY:

\mathcal{O}(1) per testcase.

# CODE:

Editorialist's code (Python)
for _ in range(int(input())):
x, y = map(int, input().split())
print('Profit' if x < y else 'Loss' if x > y else 'Neutral')