#P1936. 水晶灯火灵
水晶灯火灵
Description
The great “Ai Yu Chou” stepped out of the Fairy-type Gym in high spirits—he had just earned the Fairy-type badge (applause)! But right outside, he ran into a group of パンプジン (Gourgeist) (Because today is Halloween)! What now? No worries—“Ai Yu Chou” still had a single Chandelure left (which perfectly counters Gourgeist). Perhaps because it was the last Pokémon still standing, Chandelure was extremely fired up and took down the whole group in one blow. Chandelure used a move *** (censored?!), which happened to satisfy the following three rules:
- ;
- ;
- are integers.
“Ai Yu Chou” is very happy. He wants to know the maximum value of , and in which case this maximum can be achieved. Can you help him? Please output and .
Input Format
A single integer .
Output Format
Two lines. The first line is the maximum value of . The second line is the maximum value of .
1995
m=987
n=1597
Hint
Constraints
- For of the testdata, .
- For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号