#include<iostream>
#include<vector>
using namespace std;

class Point
{
public:
	Point()
	{
		x = 0;
		y = 0;
	}
	Point(double x, double y)
	{
		this->x = x;
		this->y = y;
	}
	double getX()
	{
		return x;
	}
	double getY()
	{
		return y;
	}
	void setX(double x)
	{
		this->x = x;
	}
	void setY(double y)
	{
		this->y = y;
	}
private:
	double x;
	double y;
};

class PointPair : public Point
{
public:
	PointPair()
	{
		p1 = 0;
		p2 = 0;
		dist = 0;
	}
	Point * p1()
	{
		return p1;
	}
	Point * p2()
	{
		return p2;
	}
	void setP1(Point * p)
	{
		p1 = p;
	}
	void setP2(Point * p)
	{
		p2 = p;
	}
	void setDistance(double d)
	{
		dist = d;
	}
private:
	Point* p1;
	Point* p2;
	double dist;
};

int main()
{
	double x;
	double y;
//	int count = 0;
	vector<Point> plotPoints;
	
	do
	{
		cout << "Enter (x,y) Coordinates ((-1, -1) to stop): ";
		cin >> x >> y;
		cout << x  << " " << y << endl;
		if ((x == -1) || (y == -1))
		{
			cout << "-1 -1 Entered. Calculating closest points..." << endl;
			break;
		}
		else
		{
			plotPoints.push_back(Point(x, y));
		}

	} while (x != -1 || y != -1);


	cout << plotPoints.size() << " number of points entered. "<< endl;


	system("pause");
}