Implement a function to determine if a user has enough storage space to save a collection of files. The function should take the available space and the sizes of two types of files into consideration.
Functionality
You need to implement the function can_save_files(N, X, Y) which evaluates if the available storage space is sufficient to save certain files. The function uses the following parameters:
N: An integer representing the amount of available storage space.
X: An integer representing the number of files of type A, each of size 1 unit.
Y: An integer representing the number of files of type B, each of size 2 units.
The total required storage space will be calculated as:
text
total_size = X * 1 + Y * 2
The function should return "YES" if the available space N is greater than or equal to total_size, otherwise it should return "NO".
Input/Output Requirements
Input: The function takes three integers, N, X, and Y.
Output: The function should return a string: "YES" if the available space is sufficient and "NO" otherwise.
Example Cases
Input: can_save_files(5, 1, 2)
Output: YES (Total size needed is 5, which matches the available space)
Input: can_save_files(3, 2, 2)
Output: NO (Total size needed is 6, which exceeds the available space)
Implementation
Write the solution in a file called /app/solution.py. Make sure to include necessary error checks or edge cases where applicable.