cho.sh
Notes
Loading...

Year 2007

Time limit

2s

Memory limit

128 MB

Problem

Today is Monday, January 1, 2007. Given a date in 2007, write a program that determines the day of the week for that date.

Input

The first line contains a month x and a day y, separated by a space. 1 <= x <= 12 and 1 <= y <= 31.

The number of days in each month of 2007 is as follows.

  • January, March, May, July, August, October, December: 31 days
  • April, June, September, November: 30 days
  • February: 28 days

The input date is guaranteed to be a valid date in 2007.

Output

Print the day of the week for the given date as one of SUN, MON, TUE, WED, THU, FRI, or SAT.