#include <bits/stdc++.h>
using namespace std;
template <class T>
using minheap = priority_queue<T, vector<T>, greater<T>>;
template <typename T>
void setmax(T& a, T b) {
  a = max(a, b);
};
template <typename T>
void setmin(T& a, T b) {
  a = min(a, b);
};
template <typename T>
bool in(T lo, T v, T hi) {
  return lo <= v && v <= hi;
};
void solve() {
  int N, S;
  cin >> N >> S;
  vector<int> a(N, 0);
  auto pr = [&](int k) -> void {
    cout << "YES\n";
    for (int i : a) cout << i << " ";
    cout << '\n';
    cout << k << '\n';
  };
  if (S >= 2 * N) {
    for (int i = 0; i < S; i++) a[i % N]++;
    pr(1);
  } else {
    cout << "NO\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
