/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.time.*;
import java.time.format.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
System.out.println (isDateValid("12/10/2021"));
	}

static boolean isDateValid(String date) {
	try {
		DateTimeFormatter formatter = DateTimeFormatter
			.ofPattern("dd/MM/yyyy")
		    .withResolverStyle(ResolverStyle.STRICT);
		LocalDate.parse(date, formatter);
		return true;
	} catch (DateTimeException ex) {
        ex.printStackTrace();
		return false;
	}
}
}