/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.time.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
public static void main
(String[] args
) { var test
= new Scanner
(System.
in); while (test.hasNext()) {
var from = LocalDate.parse(test.next());
test.skip(" to ");
var to = LocalDate.parse(test.next());
test.nextLine();
System.
out.
printf("%s to %s = %s%n", from, to, isMonth
(from, to
)); }
}
static boolean isMonth(LocalDate from, LocalDate to) {
var end = from.plusMonths(1).minusDays(1);
return to.equals(end);
}
}