ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

USU Championship 2006

About     Problems     Submit solution     Judge status     Standings
Contest is over

D. Table Football

Time limit: 1.0 second
Memory limit: 64 MB
During the Petrozavodsk Training Camp, a round-robin table-football tournament was held among N teams participating in the camp. In the course of the tournament, each team played with each team exactly once. If a teams wins a match, it earns 3 points; a draw brings 1 point to a team; and for a defeat a team gets 0 points. It is known that the Ural SU Osliki team took the first place, and the Ural SU T34 team took the last place. It is required to determine the maximal possible number of points of the Ural SU T34 team and the minimal possible number of points of the Ural SU Osliki team. If several teams earned the same number of points during the tournament, then they share the same place. The difference between scored and missed goals and results of previous encounters are not taken into account.

Input

The input contains the integer 1 ≤ N ≤ 1000.

Output

Output two integers separated with a space: the minimal possible number of points of the Ural SU Osliki team and the maximal possible number of points of the Ural SU T34 team.

Sample

inputoutput
2
1 1
Problem Author: Sergey Pupyrev
Problem Source: The XIth USU Programing Championship, October 7, 2006
To submit the solution for this problem go to the Problem set: 1483. Table Football