QOJ.ac

QOJ

実行時間制限: 1 s メモリ制限: 32 MB 満点: 10

#13512. Julka

統計

Yesterday at kindergarten, Julka surprised her teacher by solving the following riddle:

Klaudia and Natalia have 10 apples in total, but Klaudia has 2 more apples than Natalia. How many apples does each girl have?

Julka answered without hesitation: Klaudia has six apples, and Natalia has four apples.

The teacher decided to check if Julka's answer was a coincidence and repeated the riddle, increasing the number of apples each time. Julka always answered correctly. Surprised, the teacher wanted to continue "testing" Julka, but with very large numbers, she could not solve the riddle quickly herself. Help the kindergarten teacher and write a program that will provide her with the solutions.

Write a program that:

  • reads (from standard input) the total number of apples the two girls have and how many more apples Klaudia has,
  • calculates how many apples Klaudia has and how many apples Natalia has,
  • prints the result (to standard output).

Input

The input consists of two lines. The first line contains the total number of apples the girls have, and the second line contains the number indicating how many more apples Klaudia has. Both numbers are positive integers. It is known that the girls have no more than $10^{100}$ (a one followed by one hundred zeros) apples in total. As you can see, the apples can be very tiny.

Output

Your program should print (to standard output) two integers, one per line. The first line should contain the number of apples Klaudia has, and the second line should contain the number of apples Natalia has. It is known that the girls always have whole apples.

Examples

Input 1

10
2

Output 1

6
4

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.