#include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
#include <set>
#include <complex>

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,j) FOR(i,0,j)
#define mp std::make_pair

const int INF = 1 << 24;
const int dx[4] = {0, 0, 1, -1}, dy[4] = {1, -1, 0, 0};

typedef unsigned long long ull;
typedef std::complex<double> P;

double snorm(const P& p){
    return std::sqrt(norm(p));
}

P toUnit(const P& p){
    return {real(p) / snorm(p), imag(p) / snorm(p)};
}

double cross(const P& lp, const P& rp){
    return real(lp) * imag(rp) - imag(lp) * real(rp);
}

double dot(const P& lp, const P& rp){
    return real(lp) * real(rp) + imag(lp) * imag(rp);
}



int main(){
    P p1, p2, q;
    double x1, y1, x2, y2, xq, yq;
    while(~scanf("%lf,%lf,%lf,%lf,%lf,%lf", &x1, &y1, &x2, &y2, &xq, &yq)){
        p1 = P{x1, y1};
        p2 = P{x2, y2};
        q = P{xq, yq};

        if(real(p1) > real(p2)){std::swap(p1, p2);}
        P p = p2 - p1, q_ = q - p1;

    
        double c = dot(p, q_) / (snorm(p) * snorm(q_)),
            s = cross(p, q_) / (snorm(p) * snorm(q_));

        p = toUnit(p) * snorm(q_);
        double rx = c * real(p) + s * imag(p) + real(p1),
            ry = -s * real(p) + c * imag(p) + imag(p1);
    
        printf("%.4f %.4f\n", rx, ry);
    }
}