import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(); int h = sc.nextInt(); int w = sc.nextInt(); int u = sc.nextInt(); int d = sc.nextInt(); int r = sc.nextInt(); int l = sc.nextInt(); long k = sc.nextLong(); int p = sc.nextInt(); int sx = sc.nextInt() - 1; int sy = sc.nextInt() - 1; int tx = sc.nextInt() - 1; int ty = sc.nextInt() - 1; char[][] field = new char[h][]; for (int i = 0; i < h; i++) { field[i] = sc.next().toCharArray(); } PriorityQueue queue = new PriorityQueue<>(); queue.add(new Path(sx, sy, 0)); long[][] costs = new long[h][w]; for (long[] arr : costs) { Arrays.fill(arr, Long.MAX_VALUE); } while (queue.size() > 0) { Path pt = queue.poll(); if (field[pt.r][pt.c] == '@') { pt.value += p; } if (costs[pt.r][pt.c] <= pt.value) { continue; } costs[pt.r][pt.c] = pt.value; if (pt.r > 0 && field[pt.r - 1][pt.c] != '#') { queue.add(new Path(pt.r - 1, pt.c, pt.value + u)); } if (pt.r < h - 1 && field[pt.r + 1][pt.c] != '#') { queue.add(new Path(pt.r + 1, pt.c, pt.value + d)); } if (pt.c > 0 && field[pt.r][pt.c - 1] != '#') { queue.add(new Path(pt.r, pt.c - 1, pt.value + l)); } if (pt.c < w - 1 && field[pt.r][pt.c + 1] != '#') { queue.add(new Path(pt.r, pt.c + 1, pt.value + r)); } } if (costs[tx][ty] <= k) { System.out.println("Yes"); } else { System.out.println("No"); } } static class Path implements Comparable { int r; int c; long value; public Path(int r, int c, long value) { this.r = r; this.c = c; this.value = value; } public int compareTo(Path another) { if (value == another.value) { return 0; } else if (value < another.value) { return -1; } else { return 1; } } } } class Scanner { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(""); public Scanner() throws Exception { } public int nextInt() throws Exception { return Integer.parseInt(next()); } public long nextLong() throws Exception { return Long.parseLong(next()); } public String next() throws Exception { if (!st.hasMoreTokens()) { st = new StringTokenizer(br.readLine()); } return st.nextToken(); } }