#include <iostream>
#include <vector>
#include <math.h>
using namespace std;
struct jcv_point
{
	float x, y;
};
int random(int min, int max) //range : [min, max]
{
    static bool first = true;
    if (first)
    {
        srand(time(NULL)); //seeding for the first time only!
        first = false;
    }
    return min + rand() % ((max + 1) - min);
}

        
int main() {
	// your code goes here
	
	 int count  = 8;
       jcv_point p1, p2, p3;
        p1.x = 325;
        p1.y = 239;
        p2.x = 431;
        p2.y = 448;
        p3.x = 640;
        p3.y = 685;
        float radius = 100;
        std::vector<jcv_point>  grid;
        std::vector<int> rand_nums;

        for (int i = 20; i < 1000; i++)
        {
            for (int j = 20; j < 1000; j++)
            {
                float x = (float)i;
                float y = (float)j;
                
                float distance1 = sqrt(pow(p1.x - x, 2) + pow(p1.y - y, 2));
                float distance2 = sqrt(pow(p2.x - x, 2) + pow(p2.y - y, 2));
                float distance3 = sqrt(pow(p3.x - x, 2) + pow(p3.y - y, 2));

                if (distance1 > radius && distance2 > radius && distance3 > radius)
                {
                    jcv_point p;
                    p.x = x;
                    p.y = y;
                    grid.push_back(p);
                    int idx = random(0, grid.size());
                    rand_nums.push_back(idx);

                }
            }
        }

        for (int i = 0; i < count; ++i)
        {
            int idx = random(0, grid.size());
            float x  = grid[rand_nums[idx]].x;
            float y = grid[rand_nums[idx]].y;
            cout<<x <<","<<y<<endl;
        } 
        
	return 0;
}