某人三天打渔两天晒网,假设他从1990年1月1日开始打渔三天,然后晒网两天,请编程回答任意的一天他在打渔还是晒网。
A boy works for 3 days while has a 2 days off. If he is working on 1st, Jan, 1990, then for a date entered from the keyboard, please write a program to determine what the boy is doing, working or resting?
Examples of input and output:
1)Input:
1990-01-05
Output:
He is having a rest.
2)Input:
1990-01-07
Output:
He is working.
3)Input:
1990-01-33
Output:
Invalid input.
***输入数据格式***:"%4d-%2d-%2d"
***输出数据格式***:"Invalid input."或"He is having a rest." 或"He is working."