Need formula for this

Need formula for this

Can someone help me please with this in Excel 2010:

In the example of the attached picture:

Example with yellow cells: numbers in A1 and B1 to be detected on the columns E, F, I, J (cells A1 and B1 are always side by side in this way), then these two numbers to be displayed in the cell M3 plus the maximal of the numbers from the cells: C1, G2 and K4 (neighboring cells). The final text (cell M3) must look exactly like in the picture.