import scala.annotation.tailrec
import scala.collection.{immutable, mutable}
object Main extends App {
  import scala.io.StdIn._
  val map = mutable.Map[Coordinate, Int]()
  val queue = mutable.Queue[Int]()
  loop()
  @tailrec def loop(): Unit = {
    val n = readInt()
    if (n == 0) return
    val nodes = Array.fill(2 * n){Nil: List[Edge]}
    map.clear()
    for (i ← 0 until n) {
      val Array(ax, ay, d) = readLine.trim.split(' ')
      val current@Coordinate(x, y) = Coordinate(ax.toInt, ay.toInt)
      for (neighbor ← current.neighbors; j ← map.get(neighbor)) {
        nodes(i * 2) ::= Edge(j, 0)
        nodes(j) ::= Edge(i * 2, 0)
      }
      val other: Coordinate = if (d == "x") Coordinate(x + 1, y) else Coordinate(x, y + 1)
      for (neighbor ← other.neighbors; j ← map.get(neighbor)) {
        nodes(i * 2 + 1) ::= Edge(j, 0)
        nodes(j) ::= Edge(i * 2 + 1, 0)
      }
      nodes(i * 2) ::= Edge(i * 2 + 1, 1)
      nodes(i * 2 + 1) ::= Edge(i * 2, 1)
      map += current → (i * 2)
      map += other → (i * 2 + 1)
    }
    val count = Array.fill(2 * n){-1}
    var canMake = true
    for (i ← count.indices if count(i) == -1 && canMake) {
      queue.clear()
      queue.enqueue(i)
      count(i) = 0
      while(queue.nonEmpty && canMake) {
        val current = queue.dequeue()
        for (Edge(next, cost) ← nodes(current)) {
          if (count(next) == -1) {
            count(next) = (count(current) + cost) % 2
            queue.enqueue(next)
          }else if (count(next) != (count(current) + cost) % 2){
            canMake = false
          }
        }
      }
    }
    println(if (canMake) "Yes" else "No")
    loop()
  }
  case class Edge(from: Int, cost: Int)
  case class Coordinate(x: Int, y: Int) {
    def neighbors: List[Coordinate] = List(Coordinate(x + 1, y), Coordinate(x - 1, y), Coordinate(x, y + 1), Coordinate(x, y - 1))
  }
}
