func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m;   int i, j, k, l;   struct point {     long long x, y;     point(long long X = 0, long long Y = 0) {       x = X;       y = Y;     }     double dist(point &p) {       return sqrt(0. + ((p.x - x) * (p.x - x)) + ((p.y - y) * (p.y - y)));     }   };   bool operator<(const point &p, const point &q) {     return p.x < q.x || p.x == q.x && p.y < q.y;   }   long long vp(point &a, point &b, point &c) {     return (a.x - c.x) * (b.y - c.y) - (a.y - c.y) * (b.x - c.x);   }   vector<point> v;   void ans(int e = 0) {     if (e)       cout << e << endl;     else {       for (typeof((v).begin()) it = (v).begin(); it != (v).end(); it++)         cout << it->x <<     << it->y << endl;     }     exit(0);   }   bool check(vector<point> &p) {     for (int i = 0; i < p.size(); ++i)       for (int j = i + 1; j < p.size(); ++j)         for (int k = j + 1; k < p.size(); ++k)           if (vp(p[i], p[j], p[k]) == 0) {             return false;           }     return true;   }   void so() {     srand(time(0));     long long R2 = 10000;     long long R1 = 5000;     if (m == 3) {       v.push_back(point(0, 0));       v.push_back(point(1, 2));       v.push_back(point(2, 0));       if (n >= 4) v.push_back(point(1, 3));       if (n == 5) ans(-1);       if (n == 6) ans(-1);       ans();     } else if (m == 4) {       v.push_back(point(0, 0));       v.push_back(point(7, 0));       v.push_back(point(5, 2));       v.push_back(point(2, 3));       if (n >= 5) v.push_back(point(2, 7));       if (n >= 6) v.push_back(point(6, 3));       if (n >= 7) v.push_back(point(15, -1));       if (n >= 8) v.push_back(point(-1, -1));       while (!check(v))         ;       ans();     }     int d = ((m - 3) / 4 + 1) * 2 + 1;     bool fl = d * 2 - 2 >= m;     long long yh = d / 2;     yh *= yh;     if (!fl) yh += 2;     for (int x = -d / 2; x <= d / 2; ++x) {       if (x == 0 && m % 2 == 1)         ;       else         v.push_back(point(x, x * x - yh));     }     for (int x = d / 2 - fl; x >= -d / 2 + fl; --x) {       v.push_back(point(x, yh - x * x));     }     for (;;) {       vector<point> p = v;       double u = ((rand() << 15 ^ rand()) % (100000)) / 1e6;       int tn = n - m;       for (i = 0; i < m && tn; ++i) {         point q = point(v[i].x * (i % 2 ? R1 : R2), v[i].y * (i % 2 ? R1 : R2));         q = point(q.x * cos(u) - q.y * sin(u), q.x * sin(u) + q.y * cos(u));         p.push_back(q);         --tn;       }       if (check(p)) {         v = p;         break;       }     }     if (v.size() != n) ++*(int *)0;     ans();   }   int main() {     cin >> n >> m;     so();     return 0;   }   