Chips

시간 제한2초메모리 제한2048 MB

요약
칩이 n개씩 든 통 k개가 있을 때, 바실리가 처음으로 빈 통을 집는 순간까지 지날 수 있는 최소와 최대 시간을 구한다.
난이도

쉬움10점 중 3점

유형
수학, 그리디
정답자
아직 제출이 없습니다

문제

Programmer Vasiliy bought kk cans of chips, with nn chips in each can. Now he is watching a movie and eating chips. After each minute of the movie, our hero takes one of the cans and eats a chip from it.

At a certain moment, Vasiliy took one of the cans, but there were no chips left in it. What is the minimum and maximum number of minutes that could have passed since the start of the movie?

입력

The input consists of a single line containing two integers kk and nn separated by a space: the number of cans of chips and their size, respectively (1≤k,n≤501 \leq k, n \leq 50).

출력

Output two integers separated by a space: the minimum and maximum number of minutes that could have passed before Vasiliy took a can without chips.

예제2

  1. 예제 1

    입력
    3 4
    
    예상 출력
    5 13
    
  2. 예제 2

    입력
    49 15
    
    예상 출력
    16 736