There's Dad jokes and there's maths teachers' jokes.IIRC I first heard this one from my maths teacher in the 80s, and I am pretty sure one of the kids brought it home from their teacher.