function solution(m, n, puddles){
let dp=Array.from({length:n+1}, ()=>new Array(m+1).fill(0));
for (let i=1;i<=n;i++){
for (let j=1;j<=m;j++){
if (i===1&&j===1){
dp[i][j]=1;
}else{
if (isPuddle(i, j, puddles)){
continue;
}
dp[i][j]=(dp[i-1][j]+dp[i][j-1])%1000000007;
}
}
}
return dp[n][m];
}
const isPuddle = (x, y, puddles) => {
for(const puddle of puddles) {
if(puddle[0] === y && puddle[1] === x)
return true;
}
return false;
}