P25405 [AtCoder] Square Chips 2
普及
题目描述

Problem Description

There are two wafers: one with a diameter of 200 mm and the other with a diameter of 300 mm (both are circular metal discs). We aim to create square chips with dimensions of \( K \) mm by \( K \) mm from these two wafers.

We will create the square chips by cutting the wafers vertically and horizontally at equal intervals of \( K \) mm from the edge of the circle.

Determine the number of chips that can be obtained from the 200 mm diameter wafer and the 300 mm diameter wafer.

For example, when \( K = 20 \), we can create chips as follows. From the 200 mm diameter wafer, we can obtain 60 chips, and from the 300 mm diameter wafer, we can obtain 145 chips.

Diagram of chips taken from the wafers when \( K = 20 \)

Input Format

The input is given from the standard input in the following format:

\( K \)

Output Format

Output the answers in one line, separated by a space, in the order of the 200 mm diameter wafer and the 300 mm diameter wafer.

Sample Input and Output

Sample Input #1

20

Sample Output #1

60 145

Sample Input #2

5

Sample Output #2

1176 2700

Sample Input #3

50

Sample Output #3

4 16

Notes/Hints

Constraints

  • \( 4 \leq K \leq 50 \)
  • \( K \) is a divisor of both 200 and 300. This means that for both wafers, it is possible to cut them evenly from edge to edge without any remainder.

Sample Explanation 1

  • This is the input given in the example in the problem statement.
输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
20
样例输出
60 145