#include <bits/stdc++.h>
using namespace std;
int n, m;
char c[105][105];
int vis[105][105];
int direc[4][2] = {{0, -1},{-1, 0}, {0,1}, {1, 0}};
bool check(int x, int y)
{
if (x < 1 || y < 1 || x > n || y > m || vis[x][y] || c[x][y] == '#')
return false;
return true;
}
bool dfs(int x, int y)
{
if (x == n && y == m)
return true;
if (c[n][m] == '#')
return false;
for (int i = 0; i < 4; i++)
{
int xx = x + direc[i][0];
int yy = y + direc[i][1];
if (check(xx, yy))
{
cout << x << " " << y << endl;
vis[xx][yy] = 1;
dfs(xx, yy);
vis[xx][yy] = 0;
}
}
return false;
}
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
cin >> n >> m;
for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= m; j++)
{
cin >> c[i][j];
}
}
vis[1][1] = 1;
if (dfs(1, 1))
{
cout << "Yes" << endl;
}
else
cout << "No" << endl;
return 0;
}