#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e5 + 10;
int n, s;
bool go1() {
  vector<int> a(n, 1);
  int rem = s - n;
  a[0] += rem;
  int after = n - 1;
  for (int i = 1; i <= s; ++i) {
    int k = a[0] - i;
    if (k < 0) break;
    int sk = s - k;
    if (k <= after || sk <= after) continue;
    cout << "YES" << '\n';
    for (int x : a) cout << x << ' ';
    cout << '\n';
    cout << k << '\n';
    return true;
  }
  return false;
}
bool go2() {
  vector<int> a(n, 1);
  int rem = s - n;
  int front = (rem + 1) / 2, back = rem / 2;
  a.front() += front;
  a.back() += back;
  int middle_cnt = n - 2;
  for (int k = 0; k <= s; ++k) {
    int sk = s - k;
    if (middle_cnt <= k || middle_cnt <= sk) continue;
    if (front <= k && k - front <= middle_cnt) continue;
    if (back <= k && k - back <= middle_cnt) continue;
    if (back + middle_cnt + front == k) continue;
    if (front <= sk && sk - front <= middle_cnt) continue;
    if (back <= sk && sk - back <= middle_cnt) continue;
    if (back + middle_cnt + front == sk) continue;
    cout << "YES" << '\n';
    for (int x : a) cout << x << ' ';
    cout << '\n';
    cout << k << '\n';
    return true;
  }
  return false;
}
bool go3() {
  vector<int> a(n, 1);
  int rem = s - n;
  a[0] += rem;
  int front = a.front();
  int after = n - 1;
  for (int k = 0; k <= s; ++k) {
    int sk = s - k;
    if (k == s || sk == s) continue;
    if (k <= after || sk <= after) continue;
    if (front <= k || front <= sk) continue;
    cout << "YES" << '\n';
    for (int x : a) cout << x << ' ';
    cout << '\n';
    cout << k << '\n';
    return true;
  }
  return false;
}
void solve() {
  cin >> n >> s;
  if (n == 1) {
    if (s == 1) {
      cout << "NO" << '\n';
    } else {
      cout << "YES" << '\n';
      cout << s << '\n';
      cout << 1 << '\n';
    }
    return;
  }
  if (go1()) return;
  if (go2()) return;
  if (go3()) return;
  cout << "NO" << '\n';
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(20);
  cout << fixed;
  solve();
  cout.flush();
  return 0;
}
