Income and expenses

You’ve decided to keep track of your expenses and your income this month. You have recorded all the expenses in expenses.txt file each on a separate line while keeping track of the income in income.txt file following the same format.
Now you would like to know if you have spent more than you earned or if you’ve stayed within the limits.
The program should print Great, you've stayed within the limits! if the expenses do not exceed the income, and We need to cut the spending the next month otherwise.
expenses.txt
income.txt
Output
200 300
100 400 500
Great, you've stayed within the limits!
100 200 890 654
345 234 123 1000 142
Great, you've stayed within the limits!
100 200 300
100 300
We need to cut the spending the next month
 

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue