Formula For Finding Vertex