#include <iostream>
#include <cmath>
#include <stdio.h>
#define INF 10e10
#include <stdio.h>
using namespace std;
void kaiten(double *a,double *b){

}

int main(){
  double x1,x2,y1,y2,px,py;
  char ch;
  cin >> x1>>ch >> y1>>ch >> x2>>ch >> y2>>ch >> px >>ch>> py;

  double a = (y1 - y2)/(x1 - x2);
  double m = y1 - a*x1;
  double a1,a2,a3,a4;
  if(fabs(a) > INF){
    m = 0;
    a1 = -1;
    a2 = 0;
    a3 = 0;
    a4 = 1;
  }else {
  a1 = (1-a*a)/(a*a+1);
  a2 = (2*a)/(a*a + 1);
  a3 = (2*a)/(a*a + 1);
  a4 = (a*a-1)/(a*a+1);
  }
  double ansx,ansy;
  ansx = (px*a1 + px*a2) + m;
  ansy = (py*a3 + py*a4) + m;

  printf("%.6f %.6f\n",ansx,ansy);

}