package STRINGS;
import java.util.Scanner;
public class piyushandmagicalpaerk {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int row = scn.nextInt();
int col = scn.nextInt();
int k = scn.nextInt();
int s = scn.nextInt();
char[][] arr = new char[row][col];
for (int i = 0; i < row; i++) {
for (int j = 0; j < col; j++) {
arr[i][j] = scn.next().charAt(0);
}
}
int top = 0;
int bottom = arr.length;
int left = 0;
int right = arr[bottom].length;
for (int i = left; i < right; i++) {
if (s < k) {
System.out.println("No");
}
if (s >= k) {
if (arr[top][i] == '.') {
s = s - 3;
}
if (arr[top][i] == '*') {
s = s + 4;
}
if (arr[top][i] == '#') {
top++;
break;
}
}
}
System.out.println("yes");
System.out.println(s);
}
}