INPUT FORMAT for the first assignment: The input file will be given as a command line argument. 1. First line of the file : Number of vertices 2. Rest of the lines of the file: x y coordinates of the vertices of the polygon, in counter-clockwise order; one vertex coordinates per line. Note: -Implement the 0(n^2) algorithm (checking for intersection between every pair of edges) to check if a given polygon is simple. -Discuss in the Readme file how the algorithm discussed in Section 7.7 of your text book can be modified to check if a Polygon is simple in 0(n logn) time. -Implement the O(n logn) algorithm. -If the lists described in the 0(n logn) algorithm is implemented as a linked list or any such data structure which requires 0(n)access time, this would mean a worst case running time of 0(n^2). Hence it is required you implement this as a tree (such as a balanced binary search tree) which would require 0(log n) access time. Please be informed that you can implement it as a simple list also, but you might lose some points.