Language: C++

using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define erep(i, m, n) for(int (i)=(m); (i)<=(n); (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define rrev(i, m, n) for(int (i)=(n)-1; (i)>=(m); (i)--)
#define erev(i, m, n) for(int (i)=(n); (i)>=(m); (i)--)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T, class S> inline bool minup(T& m, S x){ return m>(T)x ? (m=(T)x, true) : false; }
template<class T, class S> inline bool maxup(T& m, S x){ return m<(T)x ? (m=(T)x, true) : false; }

const int    INF = 1000000000;
const ll     MOD = 1000000007LL;
const double EPS = 1E-12;

struct Point : public complex<double>
{
public:
  Point() { this->real(0);  this->imag(0); }
  Point(const double& x, const double& y) { this->real(x);  this->imag(y); }
  Point(const complex<double> w)  { this->real(w.real());  this->imag(w.imag()); }
  inline double dot(Point p){ return (conj(*this) * p).real(); }  // ??????
  inline double det(Point p){ return (conj(*this) * p).imag(); }  // ??????
};

namespace std
{
  bool operator < (const Point& a, const Point& b)
  {
    return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
  }
}

int ccw(Point a, Point b, Point c)
{
  b -= a;
  c -= a;
  if(b.det(c) > 0.0)    return  1;
  if(b.det(c) < 0.0)    return -1;
  if(b.dot(c) < 0.0)    return  2;
  if(norm(b) < norm(c)) return -2;
  return 0;
}

typedef vector<Point> Polygon;


#define curr(P, i) P[(i) % P.size()]
#define next(P, i) P[(i+1) % P.size()]
#define prev(P, i) P[(i+P.size()-1) % P.size()]
bool isConvex(const Polygon &P) {
  for (int i = 0; i < P.size(); ++i)
    if (ccw(prev(P, i), curr(P, i), next(P, i)) > 0) return false;
  return true;
}

// O(nlogn)
vector<Point> AndrewMonotoneChain(vector<Point> ps)
{
  int n = ps.size(), k = 0;
  sort(ps.begin(), ps.end());
  vector<Point> ch(2*n);
  for(int i=0; i<n; ch[k++]=ps[i++]) // lower-hull
    while(k >= 2 && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
  for(int i=n-2, t=k+1; i>= 0; ch[k++]=ps[i--]) // upper-hull
    while(k >= t && ccw(ch[k-2], ch[k-1], ps[i]) <= 0) --k;
  ch.resize(k-1);
  return ch;
}


template<typename T> ostream& operator <<(ostream& r, const vector<T> t){vrep(v,t)r<<*v<<(v+1==t.end()?"":" ");return r;}
template<typename T> ostream& operator <<(ostream& r, const pair<vector<T>, int> p){int n=p.second;minup(n,p.first.size());rep(i,n-1)r<<p.first[i]<<' ';r<<p.first[n-1];return r;}
template<typename T> ostream& operator <<(ostream& r, const pair<T*, int> p){int n=p.second-1;rep(i,n)r<<p.first[i]<<' ';return r<<p.first[n];}
template<typename T, size_t S> ostream& operator <<(ostream& r, const T (&a)[S]){rep(i,S-1)r<<a[i]<<' ';return r<<a[S-1];}


double x, y;
bool ok = true;

int main()
{
  while(~scanf("%lf,%lf", &x, &y)){
    Polygon P;
    P.pb(Point(x, y));
    rep(i, 3){
      scanf(",%lf,%lf", &x, &y);
      P.pb(Point(x, y));
    }

    cerr << P << endl;
    //    puts(isConvex(P) ? "NO" : "YES");
    puts(AndrewMonotoneChain(P) == P ? "YES" : "NO");
  }

  return 0;
}

Compiler output:
a.cc:4:9: error: 'pair' does not name a type
    4 | typedef pair<int, int> pii;
      |         ^~~~
a.cc:5:9: error: 'vector' does not name a type
    5 | typedef vector<int> vi;
      |         ^~~~~~
a.cc:6:9: error: 'vector' does not name a type
    6 | typedef vector<pair<int, int> > vii;
      |         ^~~~~~
a.cc:24:30: error: expected template-name before '<' token
   24 | struct Point : public complex<double>
      |                              ^
a.cc:24:30: error: expected '{' before '<' token
a.cc:24:30: error: expected unqualified-id before '<' token
a.cc: In function 'bool std::operator<(const Point&, const Point&)':
a.cc:38:12: error: 'real' was not declared in this scope
   38 |     return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
      |            ^~~~
a.cc:38:53: error: 'imag' was not declared in this scope
   38 |     return real(a) != real(b) ? real(a) < real(b) : imag(a) < imag(b);
      |                                                     ^~~~
a.cc: At global scope:
a.cc:42:15: error: 'a' has incomplete type
   42 | int ccw(Point a, Point b, Point c)
      |         ~~~~~~^
a.cc:24:8: note: forward declaration of 'struct Point'
   24 | struct Point : public complex<double>
      |        ^~~~~
a.cc:42:24: error: 'b' has incomplete type
   42 | int ccw(Point a, Point b, Point c)
      |                  ~~~~~~^
a.cc:24:8: note: forward declaration of 'struct Point'
   24 | struct Point : public complex<double>
      |        ^~~~~
a.cc:42:33: error: 'c' has incomplete type
   42 | int ccw(Point a, Point b, Point c)
      |                           ~~~~~~^
a.cc:24:8: note: forward declaration of 'struct Point'
   24 | struct Point : public complex<double>
      |        ^~~~~
a.cc: In function 'int ccw(Point, Point, Point)':
a.cc:49:6: error: 'norm' was not declared in this scope
   49 |   if(norm(b) < norm(c)) return -2;
      |      ^~~~
a.cc: At global scope:
a.cc:53:9: error: 'vector' does not name a type
   53 | typedef vector<Point> Polygon;
      |         ^~~~~~
a.cc:59:21: error: 'Polygon' does not name a type
   59 | bool isConvex(const Polygon &P) {
      |                     ^~~~~~~
a.cc: In function 'bool isConvex(const int&)':
a.cc:60:25: error: request for member 'size' in 'P', which is of non-class type 'const int'
   60 |   for (int i = 0; i < P.size(); ++i)
      |                         ^~~~
a.cc:58:27: error: request for member 'size' in 'P', which is of non-class type 'const int'
   58 | #define prev(P, i) P[(i+P.size()-1) % P.size()]
      |                           ^~~~
a.cc:61:13: note: in expansion of macro 'prev'
   61 |     if (ccw(prev(P, i), curr(P, i), next(P, i)) > 0) return false;
      |             ^~~~
a.cc:58:41: error: request for member 'size' in 'P', which is of non-class type 'const int'
   58 | #define prev(P, i) P[(i+P.size()-1) % P.size()]
      |                                         ^~~~
a.cc:61:13: note: in expansion of macro 'prev'
   61 |     if (ccw(prev(P, i), curr(P, i), next(P, i)) > 0) return false;
      |             ^~~~
a.cc:56:30: error: request for member 'size' in 'P', which is of non-class type 'const int'
   56 | #define curr(P, i) P[(i) % P.size()]
      |                              ^~~~
a.cc:61:25: note: in expansion of macro 'curr'
   61 |     if (ccw(prev(P, i), curr(P, i), next(P, i)) > 0) return false;
      |                         ^~~~
a.cc:57:32: error: request for member 'size' in 'P', which is of non-class type 'const int'
   57 | #define next(P, i) P[(i+1) % P.size()]
      |                                ^~~~
a.cc:61:37: note: in expansion of macro 'next'
   61 |     if (ccw(prev(P, i), curr(P, i), next(P, i)) > 0) return false;
      |                                     ^~~~
a.cc: At global scope:
a.cc:66:1: error: 'vector' does not name a type
   66 | vector<Point> AndrewMonotoneChain(vector<Point> ps)
      | ^~~~~~
a.cc:80:22: error: 'ostream' does not name a type
   80 | template<typename T> ostream& operator <<(ostream& r, const vector<T> t){vrep(v,t)r<<*v<<(v+1==t.end()?"":" ");return r;}
      |                      ^~~~~~~
a.cc:81:22: error: 'ostream' does not name a type
   81 | template<typename T> ostream& operator <<(ostream& r, const pair<vector<T>, int> p){int n=p.second;minup(n,p.first.size());rep(i,n-1)r<<p.first[i]<<' ';r<<p.first[n-1];return r;}
      |                      ^~~~~~~
a.cc:82:22: error: 'ostream' does not name a type
   82 | template<typename T> ostream& operator <<(ostream& r, const pair<T*, int> p){int n=p.second-1;rep(i,n)r<<p.first[i]<<' ';return r<<p.first[n];}
      |                      ^~~~~~~
a.cc:83:22: error: 'size_t' has not been declared
   83 | template<typename T, size_t S> ostream& operator <<(ostream& r, const T (&a)[S]){rep(i,S-1)r<<a[i]<<' ';return r<<a[S-1];}
      |                      ^~~~~~
a.cc:83:32: error: 'ostream' does not name a type
   83 | template<typename T, size_t S> ostream& operator <<(ostream& r, const T (&a)[S]){rep(i,S-1)r<<a[i]<<' ';return r<<a[S-1];}
      |                                ^~~~~~~
a.cc: In function 'int main()':
a.cc:91:10: error: 'scanf' was not declared in this scope
   91 |   while(~scanf("%lf,%lf", &x, &y)){
      |          ^~~~~
a.cc:92:5: error: 'Polygon' was not declared in this scope
   92 |     Polygon P;
      |     ^~~~~~~
a.cc:93:5: error: 'P' was not declared in this scope
   93 |     P.pb(Point(x, y));
      |     ^
a.cc:93:20: error: invalid use of incomplete type 'struct Point'
   93 |     P.pb(Point(x, y));
      |                    ^
a.cc:24:8: note: forward declaration of 'struct Point'
   24 | struct Point : public complex<double>
      |        ^~~~~
a.cc:96:22: error: invalid use of incomplete type 'struct Point'
   96 |       P.pb(Point(x, y));
      |                      ^
a.cc:24:8: note: forward declaration of 'struct Point'
   24 | struct Point : public complex<double>
      |        ^~~~~
a.cc:99:5: error: 'cerr' was not declared in this scope
   99 |     cerr << P << endl;
      |     ^~~~
a.cc:1:1: note: 'std::cerr' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:99:18: error: 'endl' was not declared in this scope
   99 |     cerr << P << endl;
      |                  ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:101:10: error: 'AndrewMonotoneChain' was not declared in this scope
  101 |     puts(AndrewMonotoneChain(P) == P ? "YES" : "NO");
      |          ^~~~~~~~~~~~~~~~~~~
a.cc:101:5: error: 'puts' was not declared in this scope
  101 |     puts(AndrewMonotoneChain(P) == P ? "YES" : "NO");
      |     ^~~~