Dollar hits yearly high, yen nears 40-year low