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 <algorithm>
#include <cassert>
#include <vector>
#include <sstream>
#include <cmath>
#include <stdio.h>

using namespace std;

//-------------------------------------------------------------------------
// geometric library
//-------------------------------------------------------------------------
// geometric library

namespace geometry {

#define EPS 1E-10 ///< 0とみなすサイズ。適当

	struct point {
		double x;
		double y;

		point& operator += (const point& rhs) { x += rhs.x; y += rhs.y; return *this; }
		point& operator -= (const point& rhs) { x -= rhs.x; y -= rhs.y; return *this; }
		point& operator /= (double factor) { x /= factor; y /= factor; return *this; }
		point& operator *= (double factor) { x *= factor; y *= factor; return *this; }
		bool operator == (const point& rhs) const { return (std::abs(x - rhs.x) < EPS) && (std::abs(y - rhs.y) < EPS); }
		bool operator != (const point& rhs) const { return !(*this == rhs); }
		bool operator <= (const point& rhs) const { return x < rhs.x || (x == rhs.x && y <= rhs.y); }
		bool operator >= (const point& rhs) const { return x > rhs.x || (x == rhs.x && y >= rhs.y); }
		bool operator < (const point& rhs) const { return !(*this >= rhs); }
		bool operator > (const point& rhs) const { return !(*this <= rhs); }
		double arg() const { return atan2(y, x); }
	};

	struct circle {
		point center;
		double radius;
	};

	struct line {
		// ax + by + c = 0
		double a;
		double b;
		double c;
	};

	enum rotate_dir {
		rotate_None = 0,
		rotate_CW = 1,
		rotate_CCW = -1
	};

	point operator + (const point& p1, const point& p2)
	{
		point p(p1);
		p += p2;
		return p;
	}

	point operator / (const point& p1, double factor)
	{
		point p(p1);
		p /= factor;
		return p;
	}

	point operator * (const point& p1, double factor)
	{
		point p(p1);
		p *= factor;
		return p;
	}

	point operator * (double factor, const point& p1)
	{
		point p(p1);
		p *= factor;
		return p;
	}

	point operator - (const point& p1, const point& p2)
	{
		point p(p1);
		p -= p2;
		return p;
	}

	std::istream& operator >> (std::istream& is, point& p)
	{
		is >> p.x >> p.y;
		return is;
	}

	double get_norm(const point& p)
	{
		return sqrt(p.x * p.x + p.y * p.y);
	}

	double inner_product(const point& p1, const point& p2)
	{
		return p1.x * p2.x + p1.y * p2.y;
	}

} // namespace geometry


//-------------------------------------------------------------------------
// solution

using namespace geometry;

int main(void) {
	point p1, p2, pq, pr;
	string line;

	while (getline(cin, line)) {
		replace(line.begin(), line.end(), ',', ' ');
		istringstream ss(line);
		ss >> p1 >> p2 >> pq;

		p2 -= p1; // p1原点に移動
		pq -= p1;

		double theta = 2 * (pq.arg() - p2.arg());

		pr.x = pq.x * cos(theta) + pq.y * sin(theta);
		pr.y = -pq.x * sin(theta) + pq.y * cos(theta);

		pr += p1; // 元に戻す

		printf("%f %f\n", pr.x, pr.y);
	}

	return 0;
}