#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void printl(T a, char c = '\n') {
  cout << a << c;
}
template <typename T>
inline void print(T a, char c = ' ') {
  cout << a << c;
}
template <typename T1, typename T2>
inline void print(T1 a, T2 b) {
  cout << a << " " << b << endl;
}
inline void solve() {
  long long n, s, k;
  cin >> n >> s;
  k = s;
  if (n * 2 < s) {
    printl("YES");
    for (long long i = 1; i < n; i++) {
      cout << 2 << " ";
      s -= 2;
    }
    cout << s << '\n';
    printl(k - 1);
  } else if (n * 2 == s) {
    printl("YES");
    for (long long i = 1; i < n; i++) {
      cout << 1 << " ";
      s -= 1;
    }
    cout << s << '\n';
    printl(k - n);
  } else
    printl("NO");
}
signed main() {
  long long n = 1;
  while (n--) solve();
  ;
  return 0;
}
