PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000105. Kiến tạo BCNN theo số chữ số (LCM)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Kiến tạo BCNN theo số chữ số (LCM)
LCM
Source: AtCoder
Version: Phuoc Hung OJ Extended
Problem Statement
Given positive integers , determine whether there exist positive integers such that has exactly decimal digits, has exactly decimal digits, and has exactly decimal digits. If possible, print Yes and any valid pair; otherwise print No.
Input
One line contains three integers .
Output
If impossible, print No. Otherwise print Yes on the first line and on the second line.
Subtasks
- Subtask 1 (20 points): .
- Subtask 2 (30 points): .
- Subtask 3 (50 points): .
Examples
Input
4 3 5
Output
Yes
3125 100
Explanation
For example, and have and digits, and their LCM is , which has exactly digits.