#include <bits/stdc++.h>
using namespace std;
struct Point {
  double x, y;
};
Point in[4];
bool solve(int num) {
  int x = 0, y = 0;
  for (int i = 0; i < 4; i++) {
    if (in[num].x == in[i].x) x++;
    if (in[num].y == in[i].y) y++;
  }
  if (x != 2 || y != 2) return false;
  return true;
}
int main() {
  while (1) {
    char c;
    for (int i = 0; i < 4; i++)
      if (i == 3)
        cin >> in[i].x >> c >> in[i].y;
      else if (!(cin >> in[i].x >> c >> in[i].y >> c))
        return 0;
    bool ans = true;
    for (int i = 0; i < 4; i++) ans = (ans && solve(i));
    if (ans)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
