JavaScript
\nconst maxArea = function(h, w, horizontalCuts, verticalCuts) {\n    const MOD = BigInt(10 ** 9 + 7)\n    \n    let maxHorDiff = 0\n    let maxVerDiff = 0\n   
```\nconst maxArea = function(h, w, horizontalCuts, verticalCuts) {\n    const MOD = BigInt(10 ** 9 + 7)\n    \n    let maxHorDiff = 0\n    let maxVerDiff = 0\n    let hor = [0, ...horizontalCuts.sort((a, b) => a - b), h]\n    let ver = [0, ...verticalCuts.sort((a, b) => a - b), w]\n    \n    for (let i = 1; i < hor.length; i++) {\n        maxHorDiff = Math.max(maxHorDiff, hor[i] - hor[i - 1])\n    }\n    \n    for (let i = 1; i < ver.length; i++) {\n        maxVerDiff = Math.max(maxVerDiff, ver[i] - ver[i - 1])\n    }\n    \n    return (BigInt(maxHorDiff) * BigInt(maxVerDiff)) % MOD\n};\n```
[]