An easy way to do this is to create an extra column which contains the values in columns A and M concatenated together.

e.g.

= A1 & "/" & M1

in row 1 of the new column and copied down.

In a second additional column, you can use the COUNTIF function to count how many times that combination appears. If you have a duplicate, you'll get a figure greater than 1

e.g. (assuming that your first extra column is P), type this into Q1 and copy down

= COUNTIF(P:P,P1)

or if you just want a YES then

= IF(COUNTIF(P:P,P1)> 1, "YES","")