/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication6;

/**
 *
 * @author Solomon M Simukoko
 */
import java.util.Scanner;
public class JavaApplication6 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        Scanner scan = new Scanner(System.in);
    
        System.out.printf("Enter Your X coordinate for your First Point\r\n");
        int xa  = scan.nextInt();

        System.out.printf("Enter Your y coordinate for your First Point\r\n");
        int ya  = scan.nextInt();

        System.out.printf("Enter Your X coordinate for your Last Point\r\n");
        int xb  = scan.nextInt();

        System.out.printf("Enter Your Y coordinate for your Last Point\r\n");
        int yb  = scan.nextInt();

        System.out.printf("Enter Your X coordinate for your test Point\r\n");
        int xc  = scan.nextInt();

        System.out.printf("Enter Your Y coordinate for your test Point\r\n");
        int yc  = scan.nextInt();
            scan.close();

    if(xa < xc && xb > xc ){

            if (ya < yc && yb >yc ){

                    System.out.printf("You point is within the box\r\n");

            }else{

                    //your point is out the box
                    System.out.printf("Your pont is Outside the box\r\n");
            }



    } else {

    //your point is out the box
            System.out.printf("Your pont is Outside the box\r\n");



    }  
        }

}
