With a few exceptions, airport codes starting with ‘Y’ designate Canadian airports. The ‘Q’ is a filler letter and the ‘M’ comes from the city it serves: Moncton (though it’s actually located in Dieppe).