By definition, we have that work is defined as the product point between two vectors.
We have then:

Where,
F: force in the direction of displacement
d: distance traveled
Rewriting the equation we have:

If the force and the displacement go in the same direction, then the cosine of the angle is different from zero and therefore there is work done.
Answer:
The force and displacement are in the same direction.