function solution(a, b) {
var answer = '';
const month = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
const day = ["FRI", "SAT", "SUN", "MON", "TUE", "WED", "THU"]
let idx = 0
for (let i = 0; i < a - 1; i++) idx += month[i];
answer = day[(idx + b - 1) % 7]
return answer;
}