#include <bits/stdc++.h>
using namespace std;
bool check(complex<double> &c) {
  double d1 =
      min(abs(c.real() - floor(c.real())), abs(c.real() - ceil(c.real())));
  double d2 =
      min(abs(c.imag() - floor(c.imag())), abs(c.imag() - ceil(c.imag())));
  double d = d1 * d1 + d2 * d2;
  d = sqrt(d);
  if (d < 1e-5) return true;
  return false;
}
int main() {
  double a, b;
  cin >> a >> b;
  complex<double> L1(a, 0);
  complex<double> L2(0, b);
  for (int i = 1; i < a; i++) {
    double theta = asin(i / a);
    stringstream ss;
    complex<double> p1 = L1 * polar(1.0, theta);
    complex<double> p2 = L2 * polar(1.0, theta);
    if (abs(p1.real() - p2.real()) < 1e-6 || abs(p1.imag() - p2.imag()) < 1e-6)
      continue;
    ss << p1 << p2;
    string s = ss.str();
    if (s.find(".") == string::npos) {
      cout << "YES" << endl << "0 0" << endl;
      for (int j = 0; j < s.size(); j++) {
        if (s[j] == '(')
          continue;
        else if (s[j] == ',')
          cout << " ";
        else if (s[j] == ')')
          cout << endl;
        else
          cout << s[j];
      }
      return 0;
    }
  }
  cout << "NO" << endl;
  return 0;
}
