Had either one of them been a male there would have been a very different ruling.
Unless they were both male, in which case it would have been fine.
There is no company I've ever worked for, where sex on company premises would not have been an instant firing offense.