Problem: Read a set of coordinates of three different points P1 (x1, y1), P2 (x2, y2), Q (xq, yq) on the plane, and line symmetry with point Q with the straight line passing through point P1 point P2 as the axis of symmetry. Create a program that outputs the point R (x, y) at the position of. Note that the point Q is not on its axis of symmetry.

<image>



input

The input consists of multiple datasets. Each dataset is given in the following format:


x1, y1, x2, y2, xq, yq


x1, y1, x2, y2, xq, yq (real numbers between -100 and 100) are given on one line separated by commas.

The number of datasets does not exceed 50.

output

Print x, y on a single line, separated by blanks, for each dataset. The output may contain an error of 0.0001 or less in real numbers.

Example

Input

1.0,0.0,-1.0,0.0,1.0,1.0
1.0,0.0,0.0,-1.0,3.0,0.0
0.0,1.0,0.0,-1.0,1.0,1.0


Output

1.000000 -1.000000
1.000000 2.000000
-1.000000 1.000000

Solution (in CPP):

Solution:
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <cmath>

using namespace std;

const double EPS=1e-10;
const double INF=1e10;

// 点オブジェクト
// ベクトルを表すのにも使う
struct Point {
    double x, y;
    Point(double x=0, double y=0) : x(x), y(y) {}
    double distance (const Point &o) const {
        return sqrt((x - o.x) * (x - o.x) + (y - o.y) * (y - o.y));
    }

    Point operator+(const Point &o) const {
        return Point(x+o.x, y+o.y);
    }

    Point operator-(const Point &o) const {
        return Point(x-o.x, y-o.y);
    }

    Point operator*(const double m) const {
        return Point(x*m, y*m);
    }

    Point operator/(const double d) const {
        return Point(x/d, y/d);
    }

    double cross(const Point &o) const {
        return x * o.y - y * o.x;
    }

    double dot(const Point &o) const {
        return x * o.x + y * o.y;
    }

    double atan() const {
        return atan2(y, x);
    }

    double norm() const {
        return dot(*this);
    }
};

struct Line {
    Point s, e; // start, end(始点,終点)
    Line(Point &s, Point &e) : s(s), e(e) {}
    Line(double sx=0, double sy=0, double ex=0, double ey=0) : s(Point(sx,sy)), e(Point(ex,ey)){}

    // 点Pからの写像
    Point projection(const Point &p) const {
        double t = (p-s).dot(s-e) / (s-e).norm();
        return s + (s-e) * t;
    }

    // 直線に対して点Pと対象な点
    Point reflection(const Point &p) const {
        return p + (projection(p) - p) * 2;
    }

    Point crosspoint(const Line &o) {
        double a = (e-s).cross(o.e-o.s);
        double b = (e-s).cross(e-o.s);
        return o.s + (o.e-o.s)*b/a;
    }
};

int main() {
    Point p1, p2, q;
    string s;
    while (getline(cin, s)) {
        for (int k = s.find(','); k != string::npos; k = s.find(',')) {
            s[k] = ' ';
        }
        istringstream ss(s);
        ss >> p1.x >> p1.y >> p2.x >> p2.y >> q.x >> q.y;
        Line l(p1, p2);
        Point ans = l.reflection(q);
        cout.precision(6);
        cout << fixed << ans.x << ' ' << ans.y << endl;
    }
    return 0;
}