Language: C++

#include <iostream>
#include <cmath>

typedef complex<double> P;

using namespace std;

double tri2s(double xa, double ya, double xb, double yb, double xc, double yc){
     double a, b, c, s;
    
     a = sqrt((xb - xc) * (xb - xc) + (yb - yc) * (yb - yc));
     b = sqrt((xa - xc) * (xa - xc) + (ya - yc) * (ya - yc));
     c = sqrt((xb - xa) * (xb - xa) + (yb - ya) * (yb - ya));
    
     s = (a+b+c) / 2;

	 cout << sqrt(s * (s - a) * (s - b) * (s - c)) << endl;
    
     return sqrt(s * (s - a) * (s - b) * (s - c));
}

double p2deg(double xa, double ya, double xb, double yb, double xc, double yc){
  double a, b, c, s, cos;
    
     a = sqrt((xb - xc) * (xb - xc) + (yb - yc) * (yb - yc));
     b = sqrt((xa - xc) * (xa - xc) + (ya - yc) * (ya - yc));
     c = sqrt((xb - xa) * (xb - xa) + (yb - ya) * (yb - ya));

	 cos = (b * b + c * c - a * a) / 2 * b * c;

	 return acos(cos);

}

// ツ陳シツ静シp1,p2ツづ静シツ閉ェp3,p4ツづ個古ーツ債キツ板サツ津ィ
// (n < 0)<=>ツ古ーツ債キ , (n == 0)<=>ツ陳シツ静シツ湘」, (n > 0)<=>ツ古ーツ債キツつオツづつ「ツづ按つ「  
double isIntersect(P p1, P p2, P p3, P p4){  
    return ( (p1.X-p2.X)*(p3.Y-p1.Y) + (p1.Y-p2.Y)*(p1.X-p3.X)) * ((p1.X-p2.X)*(p4.Y-p1.Y) + (p1.Y-p2.Y)*(p1.X-p4.X));  
}

int main(void){
     double x[4], y[4];
     double sq;
     double tri[4];
     bool isok = true;
    
     while(cin >> x[0]){
          cin.ignore(); cin >> y[0];
          cin.ignore(); cin >> x[1]; cin.ignore(); cin >> y[1];
          cin.ignore(); cin >> x[2]; cin.ignore(); cin >> y[2];
          cin.ignore(); cin >> x[3]; cin.ignore(); cin >> y[3];
		  
		  P a(x[0], y[0]);
		  P b(x[1], y[1]);
		  P c(x[2], y[2]);
		  P d(x[3], y[3]);
		  /*
          sq = tri2s(x[0], y[0], x[1], y[1], x[2], y[2]) + tri2s(x[0],y[0],x[2],y[2],x[3],y[3]);
         
          tri[0] = tri2s(x[0], y[0], x[1], y[1], x[2], y[2]);
          tri[1] = tri2s(x[0], y[0], x[1], y[1], x[3], y[3]);
          tri[2] = tri2s(x[0], y[0], x[2], y[2], x[3], y[3]);
          tri[3] = tri2s(x[1], y[1], x[2], y[3], x[3], y[3]);
         
          for(int i=0;i<4;i++){
               if(tri[i] > sq) isok = false;
          }
          if(tri2s(x[0],y[0],x[1],y[1],x[2],y[2]) + tri2s(x[0],y[0],x[2],y[2],x[3],y[3]) ==
			 tri2s(x[0],y[0],x[1],y[1],x[3],y[3]) + tri2s(x[2],y[2],x[1],y[1],x[3],y[3]) ){
               cout << "YES" << endl;
          }else{
               cout << "NO" << endl;
          }
          isok = true;
		  */
		  
		  if( isIntersect(a,c,b,d) > 0.0 || isIntersect(b,d,a,c) > 0.0 ){
			printf("NO\n");
		  }else{
			printf("YES\n");
		  }
	 }
	 return 0;
}

Compiler output:
a.cc:4:9: error: 'complex' does not name a type
    4 | typedef complex<double> P;
      |         ^~~~~~~
a.cc:37:20: error: 'P' was not declared in this scope
   37 | double isIntersect(P p1, P p2, P p3, P p4){
      |                    ^
a.cc:37:26: error: 'P' was not declared in this scope
   37 | double isIntersect(P p1, P p2, P p3, P p4){
      |                          ^
a.cc:37:32: error: 'P' was not declared in this scope
   37 | double isIntersect(P p1, P p2, P p3, P p4){
      |                                ^
a.cc:37:38: error: 'P' was not declared in this scope
   37 | double isIntersect(P p1, P p2, P p3, P p4){
      |                                      ^
a.cc:37:42: error: expression list treated as compound expression in initializer [-fpermissive]
   37 | double isIntersect(P p1, P p2, P p3, P p4){
      |                                          ^
a.cc: In function 'int main()':
a.cc:53:19: error: 'P' was not declared in this scope
   53 |                   P a(x[0], y[0]);
      |                   ^
a.cc:54:20: error: expected ';' before 'b'
   54 |                   P b(x[1], y[1]);
      |                    ^~
      |                    ;
a.cc:55:20: error: expected ';' before 'c'
   55 |                   P c(x[2], y[2]);
      |                    ^~
      |                    ;
a.cc:56:20: error: expected ';' before 'd'
   56 |                   P d(x[3], y[3]);
      |                    ^~
      |                    ;
a.cc:77:35: error: 'a' was not declared in this scope
   77 |                   if( isIntersect(a,c,b,d) > 0.0 || isIntersect(b,d,a,c) > 0.0 ){
      |                                   ^
a.cc:77:37: error: 'c' was not declared in this scope
   77 |                   if( isIntersect(a,c,b,d) > 0.0 || isIntersect(b,d,a,c) > 0.0 ){
      |                                     ^
a.cc:77:39: error: 'b' was not declared in this scope
   77 |                   if( isIntersect(a,c,b,d) > 0.0 || isIntersect(b,d,a,c) > 0.0 ){
      |                                       ^
a.cc:77:41: error: 'd' was not declared in this scope
   77 |                   if( isIntersect(a,c,b,d) > 0.0 || isIntersect(b,d,a,c) > 0.0 ){
      |                                         ^
a.cc:77:42: error: 'isIntersect' cannot be used as a function
   77 |                   if( isIntersect(a,c,b,d) > 0.0 || isIntersect(b,d,a,c) > 0.0 ){
      |                                          ^
a.cc:77:64: error: 'isIntersect' cannot be used as a function
   77 |                   if( isIntersect(a,c,b,d) > 0.0 || isIntersect(b,d,a,c) > 0.0 ){
      |                                                     ~~~~~~~~~~~^~~~~~~~~