import scala.collection.mutable
object Main extends App {
  import scala.io.StdIn._
  val Array(n, t, s, e) = readLine.trim.split(' ').map(_.toInt)
  val islands = Array.fill(n){Nil: List[(Int, Int)]}
  for (_ ← 1 until n){
    val Array(a, b, w) = readLine.trim.split(' ').map(_.toInt)
    islands(a - 1) ::= (b - 1, w)
    islands(b - 1) ::= (a - 1, w)
  }
  val bridgeFromS = Array.fill(n){-1}
  val queue = mutable.Queue[Int](s - 1)
  while(queue.nonEmpty) {
    val current = queue.dequeue()
    for ((next, _) ← islands(current) if next != s - 1 && bridgeFromS(next) == -1) {
      queue.enqueue(next)
      bridgeFromS(next) = current
    }
  }
  val bridgeWToE = Array.fill(n){0}
  val bridgeToE = Array.fill(n){-1}
  queue.enqueue(e - 1)
  while(queue.nonEmpty) {
    val current = queue.dequeue()
    for ((next, w) ← islands(current) if next != e - 1 && bridgeToE(next) == -1) {
      bridgeToE(next) = current
      bridgeWToE(next) = w
      queue.enqueue(next)
    }
  }
  val maxDamage = Array.fill(n){0}
  var canCollect = true
  for (current ← 0 until n if canCollect) {
    if (current == s - 1){
      canCollect = islands(current).filter(_._1 != bridgeToE(current)).map{case (i, w) ⇒ w - islands(i).length * t.toLong}.sorted.zipWithIndex.map{case (m, r) ⇒ m - r * t.toLong}.forall(_ > 0) && ((s == e) || bridgeWToE(current) > (islands(current).length - 1) * t.toLong)
    }else if (current == e - 1) {
      canCollect = islands(current).filter(_._1 != bridgeFromS(current)).map{case (i, w) ⇒ w - (islands(i).length + 1) * t.toLong}.sorted.zipWithIndex.map{case (m, r) ⇒ m - r * t.toLong}.forall(_ > 0)
    }else if (bridgeFromS(current) == bridgeToE(current)) {
      canCollect = islands(current).filter(_._1 != bridgeFromS(current)).map{case (i, w) ⇒ w - (islands(i).length + 1) * t.toLong}.sorted.zipWithIndex.map{case (m, r) ⇒ m - r * t.toLong}.forall(_ > 0)
    }else {
      canCollect = islands(current).filter(b ⇒ b._1 != bridgeFromS(current) && b._1 != bridgeToE(current)).map{case (i, w) ⇒ w - islands(i).length * t.toLong}.sorted.zipWithIndex.map{case (m, r) ⇒ m - (r + 1) * t.toLong}.forall(_ > 0) && bridgeWToE(current) > (islands(current).length - 1) * t.toLong
    }
  }
  println(
    if (canCollect) "Yes" else "No"
  )
}

