Implement a function to count the number of unique shortest paths in an n x m grid that avoid specific points. The function should leverage combinatorial mathematics and modular arithmetic to compute the result efficiently.
Accept integers n and m representing the dimensions of the grid.
Accept integers x1, y1 and x2, y2 representing two points in the grid that need to be avoided while calculating paths from the top-left corner (1, 1) to the bottom-right corner (n, m).
Input Requirements
n (1 ≤ n ≤ 1000): Number of rows in the grid.
m (1 ≤ m ≤ 1000): Number of columns in the grid.
x1 (1 ≤ x1 ≤ n): The row of the first point to avoid.
y1 (1 ≤ y1 ≤ m): The column of the first point to avoid.
x2 (1 ≤ x2 ≤ n): The row of the second point to avoid.
y2 (1 ≤ y2 ≤ m): The column of the second point to avoid.
Output Requirements
The function should return an integer representing the number of unique shortest paths from (1, 1) to (n, m), avoiding the points (x1, y1) and (x2, y2). The result should be returned modulo 998244353.
Implementation
You need to create a file at location /app/solution.py that implements the above function with all necessary components for handling combinatorial calculations and modular arithmetic. Include any necessary helper functions that support the main functionality of the count_shortest_paths_avoiding_points function.
Constraints
Ensure that the implementation is efficient and handles the maximum boundary of the input constraints adequately.