Check if a number is a Kaprekar number (split square into two parts whose sum equals the original number, e.g., 45² = 2025, 20 + 25 = 45).
Difficulty: Hard
Phase: 6 · Mixed Logical Challenges
XP Reward: 30 XP
Topics: Mixed Logical Challenges, Hard
Supported Languages: Python, JavaScript, C, C++, Java
Problem Description
Check if positive integer N is a Kaprekar number (split square into two parts that sum to N). Print 'Yes' or 'No'. Input Format: Read input from standard input (stdin). Output Format: Print the result to standard output (stdout).
Constraints
- -10^9 <= N <= 10^9
Examples
Example 1
Input: 45
Output: Yes
Explanation: Sample execution for input 45