#include <iostream>

using namespace std;

class Line;  // forward declaration

class Point {
    friend int onLine(const Point&, const Line&);
public:
    Point(float x = 0, float y = 0) : x(x), y(y) {};
    void show() const;
private:
    const float x, y;
};

void Point::show() const {
    cout << "(" <<  x << ", " << y << ")";
}

class Line {
    friend int onLine(const Point&, const Line&);
public:
    Line(Point &a, Point &b) : a(a), b(b) {};
    void show() const;
private:
    Point a, b;
};

void Line::show() const {
    cout << "Line ";
    a.show();
    cout << " : ";
    b.show();
    cout << endl;
}

int onLine(const Point &p, const Line &k) {
    return ((p.x - k.a.x) / (k.b.x - k.a.x)) == ((p.y - k.a.y) / (k.b.y - k.a.y));
}

int main() {
    Point a(1, 1), b(2, 2), c(3, 3);
    Line k(a, b);

    if (onLine(c, k))
        cout << "Point c is on the line k." << endl;
    else
        cout << "Point c is not on the line k." << endl;
    
    return 0;
}
