/* 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) throws java.lang.Exception
	{
		int year = 2021;  // you can pass any value of year Like 2020,2021...
		int month = 6;   // you can pass any value of month Like 1,2,3...
		YearMonth yearMonth = YearMonth.of( year, month );  
		LocalDate firstOfMonth = yearMonth.atDay( 1 );
		LocalDate lastOfMonth = yearMonth.atEndOfMonth();
	
	    System.out.println(firstOfMonth);
	    System.out.println(lastOfMonth);
	}
}