Hi wr1015.
Imagine a rectangle ABCD in counterclockwise direction, from botton to top. At vertice A there is mass m1, at B, m2, at C, m4 and at D m3.
I'm putting the origin of coordinate axis at m1. The vector force F on m1 is:
X -> x-axis versor
Y -> y-axis versor
x -> rectangle basis
y ->...