Correct me if I'm using incorrect terms, I'm not well-versed with geometrical terminology
I'm writing a code in which
I have a point &
I want to identify if the points lies on front, back, top, bottom, left or right side of a cuboid.
For Example,
in the 1st image, the point lies on 'top' side of the cuboid.

in the 2nd image, it lies on the bottom side
Does anyone have an idea how could this be solved?
Additional Info : The cuboid is represented with co-ordinates in a 3D space.