#P9788. Plot Planning
Plot Planning
Plot Planning
You are given four variables \(a, b, c, d \in \mathbb{N}^*\) (i.e., positive integers) that must satisfy the following conditions:
- \(a \neq x\) and \(b \neq x\).
- \(a > c\) and \(b > d\).
- \(a \cdot b - c \cdot d = n\).
For given integers \(x\) and \(n\), count the number of quadruples \((a, b, c, d)\) that satisfy these conditions.
inputFormat
The input consists of a single line containing two space-separated integers \(x\) and \(n\).
outputFormat
Output a single integer representing the number of valid quadruples \((a, b, c, d)\).
sample
1 1
0