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

import java.util.*;
import java.lang.*;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	static SimpleDateFormat parserSDF=new SimpleDateFormat("yyyy-MM-DD");

	
	public static void main (String[] args) throws java.lang.Exception
	{
		System.out.println(checkIfInRange(parserSDF.parse("2014-12-31")));
	}
	
	
	public static boolean checkIfInRange(Date date){

    Calendar cal= Calendar.getInstance();

    cal.add(Calendar.YEAR, -1);
    Date yearBeforeToday = cal.getTime();
    cal.add(Calendar.YEAR, 2);
    Date yearAfterToday = cal.getTime();

    return date.after(yearBeforeToday) && date.before(yearAfterToday);
}
}