# [Python 2], 41 bytes <!-- language-all: lang-python --> lambda a,b:~-a*(a*b%2)and(a/2,b/2)or(0,0) [Try it online!][TIO-jj6y3qf1] [Python 2]: https://docs.python.org/2/ [TIO-jj6y3qf1]: https://tio.run/##K6gsycjPM/rvYxvzPycxNyklUSFRJ8mqTjdRSyNRK0nVSDMxL0UjUd9IJ0nfSDO/SMNAx0Dzf0FRZl6Jgo@GoY6lpSYXjGesY4jgmCNzjHVMkTkmCI4RUOY/AA "Python 2 – Try It Online"