I am implementing Graham Scan Algorithm for convex hull in Java. 

I am getting this error while running the code. For input string: "10 18"

```
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
    at Graham.SelectMin(Graham.java:110)
    at Graham.GrahamScan(Graham.java:78)
    at Graham.main(Graham.java:41)

```

Can anyone help me out to solve this error?

Thanks