#include<bits/stdc++.h>
using namespace std;
bool g[101][101];
int main(){
	int m,n;
	cin>>m>>n;
	cout<<"100 100"<<endl;
	for(int i=0;i<50;i++)
	for(int j=0;j<100;j++)
	g[i][j]=1;
	m--;
	for(int i=0;i<50;i+=2)
	for(int j=0;j<100;j+=2){
		if(m==0)
		break;
		g[i][j]=0;
		m--;
	}
	n--;
	for(int i=99;i>=50;i-=2)
	for(int j=0;j<100;j+=2){
		if(n==0)
		break;
		g[i][j]=1;
		n--;
	}
	for(int i=0;i<100;i++){
		for(int j=0;j<100;j++)
		if(g[i][j]) cout<<"#";
		else
		cout<<".";
		cout<<endl;
	}
}
/**
*    created: 28.06.2020 02:21:50
**/
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rep2(i, s, n) for (int i = (s); i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define pcnt(bit) __builtin_popcountll(bit)
using namespace std;
template<class T> bool chmax(T &a, const T &b) {if (a < b) {a = b; return 1;} return 0;}
template<class T> bool chmin(T &a, const T &b) {if (b < a) {a = b; return 1;} return 0;}
const int mod = 1000000007;
const long double pi = acos(-1.0);
const int inf = 1LL << 60;

signed main() {

    cin.tie(0);
    ios_base::sync_with_stdio(false);

    int a, b;
    cin >> a >> b;
    int mx = max(a,b);
    if (mx*2 <= 16) cout << "Yay!" << endl;
    else cout << ":(" << endl;
    return 0;
}