// includes {{{
#include<iostream>
#include<iomanip>
#include<algorithm>
#include<vector>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<tuple>
#include<cmath>
#include<random>
#include<cassert>
#include<bitset>
#include<cstdlib>
// #include<deque>
// #include<multiset>
// #include<cstring>
// #include<bits/stdc++.h>
// }}}
using namespace std;
using ll = long long;

// #undef DEBUG
// #define DEBUG
// DEBUG {{{
#include <array>
#include <deque>
#include <iostream>
#include <list>
#include <queue>
#include <stack>
#include <tuple>
#include <valarray>
#include <vector>
template < int n, class... T >
typename std::enable_if< (n >= sizeof...(T)) >::type __output_tuple(
    std::ostream &, std::tuple< T... > const &) {}
template < int n, class... T >
typename std::enable_if< (n < sizeof...(T)) >::type __output_tuple(
    std::ostream &os, std::tuple< T... > const &t) {
  os << (n == 0 ? "" : ", ") << std::get< n >(t);
  __output_tuple< n + 1 >(os, t);
}
template < class... T >
std::ostream &operator<<(std::ostream &os, std::tuple< T... > const &t) {
  os << "(";
  __output_tuple< 0 >(os, t);
  os << ")";
  return os;
}
template < class T, class U >
std::ostream &operator<<(std::ostream &os, std::pair< T, U > const &p) {
  os << "(" << p.first << ", " << p.second << ")";
  return os;
}
template < class T >
std::ostream &operator<<(std::ostream &os, const std::stack< T > &a) {
  os << "{";
  for(auto tmp = a; tmp.size(); tmp.pop())
    os << (a.size() == tmp.size() ? "" : ", ") << tmp.top();
  os << "}";
  return os;
}
template < class T, class Container, class Compare >
std::ostream &operator<<(std::ostream &os,
    std::priority_queue< T, Container, Compare > a) {
  os << "{ (top) ";
  while(a.size()) os << a.top() << (a.size() == 1 ? "" : ", "), a.pop();
  os << " }";
  return os;
}
template < class T, class Container >
std::ostream &operator<<(std::ostream &os, std::queue< T, Container > a) {
  os << "{ ";
  while(a.size()) os << a.front() << (a.size() == 1 ? "" : ", "), a.pop();
  os << " }";
  return os;
}
#ifdef DEBUG
#if !defined(DEBUG_OUT)
#define DEBUG_OUT std::cerr
#endif
#define dump(...)                                                                \
  [&]() {                                                                        \
    auto __debug_tap = std::make_tuple(__VA_ARGS__);                             \
    DEBUG_OUT << "[" << __LINE__ << "] " << #__VA_ARGS__ << " = " << __debug_tap \
    << std::endl;                                                      \
  }()
template < class T >
inline void dump2D(T &d, size_t sizey, size_t sizex) {
  for(size_t i = 0; i < sizey; i++) {
    DEBUG_OUT << "\t";
    for(size_t j = 0; j < sizex; j++)
      DEBUG_OUT << d[i][j] << (j + 1 == sizex ? "" : "\t");
    DEBUG_OUT << std::endl;
  }
}
template < class T >
inline void dump1D(T &d, size_t sizey) {
  for(size_t i = 0; i < sizey; i++) {
    DEBUG_OUT << d[i] << (i + 1 == sizey ? "" : " ");
  }
  DEBUG_OUT << std::endl;
}
template <
class T, class = typename std::iterator_traits< decltype(begin(T())) >::value_type,
      class = typename std::enable_if< !std::is_same< T, std::string >::value >::type >
      std::ostream &operator<<(std::ostream &os, const T &a) {
        os << "{";
        for(auto ite = begin(a); ite != end(a); ++ite)
          os << (ite == begin(a) ? "" : ", ") << *ite;
        os << "}";
        return os;
      }
#else
#define dump(...) ((void) 42)
#define dump2D(...) ((void) 42)
#define dump1D(...) ((void) 42)
template <
class T, class = typename std::iterator_traits< decltype(begin(T())) >::value_type,
      class = typename std::enable_if< !std::is_same< T, std::string >::value >::type >
      std::ostream &operator<<(std::ostream &os, const T &a) {
        for(auto ite = begin(a); ite != end(a); ++ite)
          os << (ite == begin(a) ? "" : " ") << *ite;
        return os;
      }
#endif
// }}}


std::vector<std::vector<pair<int, int>>> g;

constexpr int N = 1e5;
int n, t, s, e;
int z[N];
int w[N];

bool dfs0(int i, int p) {
  z[i] = i == e;
  for(auto &to : g[i]) if(to.first != p) {
    int j, c;
    tie(j, c) = to;
    z[i] |= dfs0(j, i);
  }
  dump(i, z[i]);
  return z[i];
}

void de(int i) {
  for(auto to : g[i]) {
    w[to.second]--;
  }
}

int imp = 0;
int fin = 0;
void dfs1(int i, int p) {
  if(imp or fin) return;
  sort(g[i].begin(), g[i].end(), [&](pair<int, int> i, pair<int, int> j) {
      return w[i.second] - int(g[i.first].size()) < w[j.second] - int(g[j.first].size());
      });
  for(auto &to : g[i]) if(to.first != p) {
    if(imp or fin) return;
    int j, c;
    tie(j, c) = to;
    if(!z[j]) {
      if(w[c] <= 0) imp = 1;
      de(j);
      dfs1(j, i);
      if(imp or fin) return;
      if(j == e) fin = 1;
      else {
        if(w[c] <= 0) imp = 1;
        de(i);
      }
    }
  }
  for(auto &to : g[i]) if(to.first != p) {
    if(imp or fin) return;
    int j, c;
    tie(j, c) = to;
    if(z[j]) {
      if(w[c] <= 0) imp = 1;
      de(j);
      dfs1(j, i);
      if(imp or fin) return;
      if(j == e) fin = 1;
      else {
        if(w[c] <= 0) imp = 1;
        de(i);
      }
    }
  }
}

int main() {
  std::ios::sync_with_stdio(false), std::cin.tie(0);
  cin >> n >> t >> s >> e;
  s--, e--;
  g.resize(n);
  for(int i = 0; i < n - 1; i++) {
    int a, b; std::cin >> a >> b >> w[i];
    a--; b--;
    w[i] = t == 0 ? int(1e9) : (w[i] + t - 1) / t;
    g[a].emplace_back(b, i);
    g[b].emplace_back(a, i);
  }
  dfs0(s, -1);
  dfs1(s, -1);
  if(!imp and s == e) fin = 1;
  if(fin) cout << "Yes" << endl;
  else cout << "No" << endl;
  return 0;
}

