// iostream is too mainstream
#include <cstdio>
// bitch please
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <list>
#include <cmath>
#include <iomanip>
#define dibs reserve
#define OVER9000 123456789012345678LL
#define ALL_THE(CAKE,LIE) for(auto LIE =CAKE.begin(); LIE != CAKE.end(); LIE++)
#define tisic 47
#define soclose 1e-8
#define chocolate win
// so much chocolate
#define patkan 9
#define ff first
#define ss second
#define abs(x) ((x < 0)?-(x):x)
#define uint unsigned int
#define dbl long double
using namespace std;
// mylittledoge

int main() {
	cin.sync_with_stdio(0);
	cin.tie(0);
	int A2,P;
	cin >> A2 >> P;
	set< pair<int,int> > V;
	for(int x =0; x <= 5000; x++) for(int y =0; y <= 5000; y++) {
		if(x*x*4+y*y*4 > P*P) break;
		int d =(int)sqrt(x*x+y*y);
		while(d*d < x*x+y*y) d++;
		while(d*d > x*x+y*y) d--;
		if(d*d == x*x+y*y) V.insert(make_pair(x,y));}

	int t =0;
	ALL_THE(V,it) for(int d =0; d <= 5000; d++) {
		if(it->ss == 0 || (A2+it->ff*d)%it->ss != 0) continue;
		int c =(A2+it->ff*d)/it->ss;
		auto jt =V.find(make_pair(d,c));
		if(jt == V.end()) continue;
		t++;
		int s1 =(int)sqrt(c*c+d*d);
		while(s1*s1 < it->ff*it->ff+it->ss*it->ss) s1++;
		while(s1*s1 > it->ff*it->ff+it->ss*it->ss) s1--;
		int s2 =(int)sqrt(c*c+d*d);
		while(s2*s2 < c*c+d*d) s2++;
		while(s2*s2 > c*c+d*d) s2--;
		int s3 =(int)sqrt((c-it->ff)*(c-it->ff)+(d-it->ss)*(d-it->ss));
		while(s3*s3 > (c-it->ff)*(c-it->ff)+(d-it->ss)*(d-it->ss)) s3--;
		while(s3*s3 < (c-it->ff)*(c-it->ff)+(d-it->ss)*(d-it->ss)) s3++;
		if(s3*s3 != (c-it->ff)*(c-it->ff)+(d-it->ss)*(d-it->ss)) continue;
		if(s3+s2+s1 != P) continue;
		cout << "Dream\n";
		cout << "0 0\n" << it->ff << " " << it->ss << "\n" << c << " " << d << "\n";
		return 0;}
	cout << "Flag\n";
	return 0;}

// look at my code
// my code is amazing
