import java.io.*; 
import javax.swing.*;

class nestedif
{    
public static void main(String args[])
{
double x = 7.0; 
double y = 3.0; 

if(x > 5) 
{ 
if(y > 5) { System.out.println("x and y are greater than 5.");} 
else if (y==5) { System.out.println("x is greater than 5  and y is equal to 5");} 
else { System.out.println("x is greater than 5 and y is smaller than 5");} 
} 
else 
{ 
if(y > 5) { System.out.println("x is smaller or equal to five  y is greater than 5.");} 
else if(y==5) { System.out.println("x is smaller or equal to five  y is equal to 5.");} 
else { System.out.println("x is smaller or equal to five  y is smaller than 5."); 
} 
}
}
}