use proconio::{fastout, input};

#[fastout]
fn main() {
    input! {n: usize, m:usize};

    println!("{}", n - 1 * m - 1)
}


print(readLine()!.characters.split(" ").reduce(1){$0*(Int(String($1))!-1)})


import Glibc
extension String: CollectionType {}

var nm = readLine()!.split(" ").map { Int($0)! }
print(nm.reduce(1) { $0 * ($1 - 1) })


extension String: CollectionType {}
let nm = readLine()!.split(" ").flatMap({ Int($0) })
print((nm[0]-1)*(nm[1]-1))


print(readLine()!.characters.split(" ").reduce(1){--Int(String($1))!*$0})


print(readLine()!.characters.split(" ").reduce(1){$0*Int(String($1))!-1})


print(readLine()!.characters.split(" ").reduce(1){$0*Int(String($1))!--})


const t={input:require('fs').readFileSync('/dev/stdin','utf8').split(/[\s]/),n:(arg:number=0):any=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.n())}return a}else{const a=t.input[0];t.input.shift();return Number(a)}},s:(arg:number=0):string|string[]=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.s())}return a}else{const a=t.input[0];t.input.shift();return String(a)}},c:(arg:number=0):string|string[]=>{if(arg){const a=[];for(let i=0;i<arg;i++){a.push(t.c())}return a}else{let a=t.input[0].split('');const b=a[0];a.shift();if(a.length>0){t.input[0]=a.join('')}else{t.input.shift()}return String(b)}},o:(...arg)=>{console.log(...arg)},abs:(a)=>{return Math.abs(a)},min:(...a)=>{return Math.min(...a)},max:(...a)=>{return Math.max(...a)},floor:(a)=>{return Math.floor(a)},asc:(ar:number[])=>{return ar.sort((a,b)=>{return a-b})},desc:(ar:number[])=>{return ar.sort((a,b)=>{return b-a})},sw:(a,arr:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<arr.length;i+=2){if(eval(a+op+arr[i]))return arr[i+1];}return arr[arr.length-1]}};
const main=()=>{
  t.o((t.n()-1)*(t.n()-1))
}
main()


import * as fs from 'fs';

const [n, m]: number[] = fs.readFileSync('/dev/stdin', 'utf8').trim().split(' ').map(Number);

const ans :number = (n - 1) * (m - 1)
console.log(ans);


console.log(require('fs').readFileSync('/dev/stdin', 'utf-8').toString().split('\n')[0].split(' ').map(Number).map(x => x - 1).reduce((a, b) => a * b))


import * as fs from 'fs';

const [n, m]: bigint[] = fs.readFileSync('/dev/stdin', 'utf8').trim().split(' ').map(BigInt);
const ans :bigint = (n - BigInt(1)) * (m - BigInt(1))
console.log(ans.toString());


a,b = [int(x) for x in input().split()]

if a == b:
    print("Draw")
elif a == 1:
    print("Alice")
elif b == 1:
    print("Bob")
elif a > b:
    print("Alice")
else:
    print("Bob")


a, b = map(int, input().split())

l = ["Alice", "Bob", "Draw"]

if a > b:
    if a == 13 and b == 1:
        idx = 1
    else:
        idx = 0
elif a < b:
    if a == 1 and b == 13:
        idx = 0
    else:
        idx = 1
else:
    idx = 2

print(l[idx])


a, b = map(int, input().split())

if a==1:
    a = 14
if b==1:
    b = 14

if a>b:
    print("Alice")
elif a<b:
    print("Bob")
else:
    print("Draw")


a, b = map(int, input().split())

if a == 1:
    a = 14

if b == 1:
    b = 14

print(a, b)

if a < b:
    print("Bob")
elif b < a:
    print("Alice")
else:
    print("Draw")


a, b = map(int, input().split())

if a == 1:
    a = 14

if b == 1:
    b == 14

if a < b:
    print("Bob")
elif b < a:
    print("Alice")
else:
    print("Draw")


a, b = map(int, input().split())

if a == 1:
    a = 14
elif b == 1:
    b == 14

if a < b:
    print("Bob")
elif b < a:
    print("Alice")
else:
    print("Draw")


import java.util.*;
import java.io.*;
import static java.lang.Math.*;

public class Main {
    public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);

		// 入力
		int a = sc.nextInt();
		int b = sc.nextInt();

		// 計算
		String result = "Alice";
		if(a == b){
		    result = "Draw";
		}else{
		    if(b == 1 || (a < b && a != 1)) result = "Bob";
		}

		// 出力
		System.out.println(result);
	}

	public static class Scanner {
		private BufferedReader br; private StringTokenizer tok;
		public Scanner(InputStream is) throws IOException { br = new BufferedReader(new InputStreamReader(is));}
		private void getLine() throws IOException { while(!hasNext()) tok = new StringTokenizer(br.readLine());}
		private boolean hasNext() { return tok != null && tok.hasMoreTokens();}
		public String next() throws IOException { getLine(); return tok.nextToken();}
		public int nextInt() throws IOException { return Integer.parseInt(next());}
		public long nextLong() throws IOException { return Long.parseLong(next());}
		public double nextDouble() throws IOException { return Double.parseDouble(next());}
	}
}


import java.io.*;
import java.util.*;
class Main{
	static final long MOD = 1_000_000_007; // 10^9+7
    static final int MAX = 2_147_483_646; // intMax
    static final int INF = 1_000_000_000; // 10^9
    public static void main(String[] args) throws Exception {
		hayami saori = new hayami();
		int a = saori.saori_hayami();
		int b = saori.saori_hayami();
		if(a == 1){
			a = 14;
		}
		if(b == 1){
			b = 14;
		}
		if(a == b){
			System.out.println("Draw");
		} else if(a > b){
			System.out.println("Alice");
		}else if(a < b){
			System.out.println("Bob");
		}
		saori.close();
    }
}

class hayami implements Closeable {
	private final InputStream in = System.in;
	private final byte[] hayami = new byte[1024];
	private int Hayami = 0;
	private int saori = 0;
	private boolean HayamiSaori() {
		if (Hayami < saori) {
			return true;
		}else{
			Hayami = 0;
			try {
				saori = in.read(hayami);
			} catch (IOException e) {
				e.printStackTrace();
			}
			if (saori <= 0) {
				return false;
			}
		}
		return true;
	}
	private int SaoriHayami() {
		if (HayamiSaori()) {
            return hayami[Hayami++];
         }else{
             return -1;
         }
	}
	private static boolean hayami_saori(int hayami) {
		return 33 <= hayami && hayami <= 126;
	}
	public boolean hayamisaori() {
		while(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++; return HayamiSaori();
	}
	public String nextHayami() {
		if (!hayamisaori()) throw new NoSuchElementException();
		StringBuilder hayamin = new StringBuilder();
		int saori = SaoriHayami();
		while(hayami_saori(saori)) {
			hayamin.appendCodePoint(saori);
			saori = SaoriHayami();
		}
		return hayamin.toString();
	}
	public long saorihayami() {//nextLong
		if (!hayamisaori()) throw new NoSuchElementException();
		long hayami = 0;
		boolean misao = false;
		int saori = SaoriHayami();
		if (saori == '-') {
			misao = true;
			saori = SaoriHayami();
		}
		if (saori < '0' || '9' < saori) {
			throw new NumberFormatException();
		}
		while(true){
			if ('0' <= saori && saori <= '9') {
				hayami *= 10;
				hayami += saori - '0';
			}else if(saori == -1 || !hayami_saori(saori)){
				return misao ? -hayami : hayami;
			}else{
				throw new NumberFormatException();
			}
			saori = SaoriHayami();
		}
	}
	public int saori_hayami() {//nextInt
		long hayami = saorihayami();
		if (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();
		return (int) hayami;
	}
	public double Hayamin() { //nextDouble
		return Double.parseDouble(nextHayami());
	}
	public void close() {
		try {
			in.close();
		} catch (IOException e) {
		}
    }

}


import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.NoSuchElementException;

public class Main {
    public static void main(String[] args) {
        FastScanner sc = new FastScanner();
        int a = sc.nextInt();
        int b = sc.nextInt();
        if (a == 1) {
            a += 13;
        }
        if (b == 1) {
            b += 13;
        }
        if (a > b) {
            System.out.println("Alice");
        }
        if (a < b) {
            System.out.println("Bob");
        }
        if (a == b) {
            System.out.println("Draw");
        }
    }
}

class FastScanner {
    public static String debug = null;

    private final InputStream in = System.in;
    private int ptr = 0;
    private int buflen = 0;
    private byte[] buffer = new byte[1024];
    private boolean eos = false;

    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                if (debug != null) {
                    buflen = debug.length();
                    buffer = debug.getBytes();
                    debug = "";
                    eos = true;
                } else {
                    buflen = in.read(buffer);
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen < 0) {
                eos = true;
                return false;
            } else if (buflen == 0) {
                return false;
            }
        }
        return true;
    }

    private int readByte() {
        if (hasNextByte())
            return buffer[ptr++];
        else
            return -1;
    }

    private static boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }

    private void skipUnprintable() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr]))
            ptr++;
    }

    public boolean isEOS() {
        return this.eos;
    }

    public boolean hasNext() {
        skipUnprintable();
        return hasNextByte();
    }

    public String next() {
        if (!hasNext())
            throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }

    public long nextLong() {
        if (!hasNext())
            throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
              n *= 10;
              n += b - '0';
            } else if (b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }

    public int nextInt() {
        return (int) nextLong();
    }

    public long[] nextLongList(int n) {
        return nextLongTable(1, n)[0];
    }

    public int[] nextIntList(int n) {
        return nextIntTable(1, n)[0];
    }

    public long[][] nextLongTable(int n, int m) {
        long[][] ret = new long[n][m];
        for (int i = 0; i < n; i ++) {
            for (int j = 0; j < m; j ++) {
                ret[i][j] = nextLong();
            }
        }
        return ret;
    }

    public int[][] nextIntTable(int n, int m) {
        int[][] ret = new int[n][m];
        for (int i = 0; i < n; i ++) {
            for (int j = 0; j < m; j ++) {
                ret[i][j] = nextInt();
            }
        }
        return ret;
    }
}


import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
        int a = sc.nextInt();
     	int b = sc.nextInt();

        if(a == b ){
          System.out.println("Draw");
        }else if(a > b && b != 1){
          System.out.println("Alice");
        }else if(a < b && a != 1){
          System.out.println("Bob");
        }else{
          System.out.println("Alice");
        }
    }
}


import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
        int a = sc.nextInt();
     	int b = sc.nextInt();

        if(a == b ){
          System.out.println("Draw");
        }else if(a > b && b != 1){
          System.out.println("Alice");
        }else{
          System.out.println("Bob");
        }
    }
}


import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		sc.close();

		if (a == b) {
			System.out.println("Draw");
			return;
		}

		if (a == 1) {
			System.out.println("Alice");
			return;
		}

		if (b == 1) {
			System.out.println("Alice");
			return;
		}

		if (a > b) {
			System.out.println("Alice");
			return;
		}

		System.out.println("Bob");

	}

}


#include <cstdio>
#include <vector>
#include <algorithm>
#include <functional>
#include <tuple>
#include <map>
#include <unordered_map>
#include <set>
#include <unordered_set>
#include <array>
#include <utility>
#include <valarray>

using namespace std;

int main()
{
    int A, B;
    scanf("%d %d\n", &A, &B);
    if (A == 1) A = 14;
    if (B == 1) B = 14;
    if (A > B){
        puts("Alice");
    }else if (A < B){
        puts("Bob");
    }else{
        puts("Draw");
    }
}


#include <stdio.h>

int main()
{
	int a,b;
	scanf("%d%d",&a,&b),a=(a+11)%13+1,b=(b+11)%13+1;
	printf("%s\n",a>b ? "Alice" : a==b ? "Draw" : "Bob");
}


#include<cmath>
#include<cstdio>
#include<cassert>
#include<cstring>
#include<algorithm>
#define MN 51
#define Cx 0.03
#define Cy 0.03
#define eps 1e-7
using namespace std;

int read_p,read_ca;
inline int read(){
    read_p=0;read_ca=getchar();
    while(read_ca<'0'||read_ca>'9') read_ca=getchar();
    while(read_ca>='0'&&read_ca<='9') read_p=read_p*10+read_ca-48,read_ca=getchar();
    return read_p;
}
int n,m;
int main(){
	register int i;
	n=read();m=read();
	if (n==1) n=14;
	if (m==1) m=14;
	if (n<m) puts("Bob");else if (n==m) puts("Draw");else puts("Alice");
}


/*
 ▓█████▄  ▄████▄  ▓██   ██▓ ██▓███   ██░ ██ ▓█████  ██▀███
▒██▀ ██▌▒██▀ ▀█   ▒██  ██▒▓██░  ██▒▓██░ ██▒▓█   ▀ ▓██ ▒ ██▒
 ░██   █▌▒▓█    ▄   ▒██ ██░▓██░ ██▓▒▒██▀▀██░▒███   ▓██ ░▄█ ▒
 ░▓█▄   ▌▒▓▓▄ ▄██▒  ░ ▐██▓░▒██▄█▓▒ ▒░▓█ ░██ ▒▓█  ▄ ▒██▀▀█▄
 ░▒████▓ ▒ ▓███▀ ░  ░ ██▒▓░▒██▒ ░  ░░▓█▒░██▓░▒████▒░██▓ ▒██▒
  ▒▒▓  ▒ ░ ░▒ ▒  ░   ██▒▒▒ ▒▓▒░ ░  ░ ▒ ░░▒░▒░░ ▒░ ░░ ▒▓ ░▒▓░
  ░ ▒  ▒   ░  ▒    ▓██ ░▒░ ░▒ ░      ▒ ░▒░ ░ ░ ░  ░  ░▒ ░ ▒░
  ░ ░  ░ ░         ▒ ▒ ░░  ░░        ░  ░░ ░   ░     ░░   ░
    ░    ░ ░       ░ ░               ░  ░  ░   ░  ░   ░
  ░      ░         ░ ░
*/
//focus less on how much problem you should solve within a fixed time and focus more on getting the problem solved and
//learning something from it
#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define rep(i,a,b) for(ll i=a; i<b; i++)
#define per(i,a,b) for(ll i=a; i>=b; i--)
#define ll long long int
#define ld long double
#define vi vector<ll>
#define pi pair<ll,ll>
#define vii vector <pair<ll,ll> >
#define sedes set <ll, greater <ll> >
#define seasc set <ll>
#define pb push_back
#define mkp make_pair
#define ff first
#define ss second
#define MOD 1000000007
#define prec(n) fixed<<setprecision(n)
#define maxpq priority_queue<int>
#define minpq priority_queue<int, vector<int>, greater<int> >
#define umap unordered_map<ll, ll>
#define map map<ll, ll>
#define autoit(x,it) for(auto it = x.begin(); it != x.end(); it++)
#define mems(a, i) memset(a, i, sizeof(a))
#define endl '\n'
#define all(v) v.begin(),v.end()
#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) ((a)*(b))/gcd((a),(b))
#define deba(a) cout << #a << " " <<a << endl;
int main()
{
	fast;
#ifndef ONLINE_JUDGE
	freopen("D:\\input.txt", "r", stdin);
	freopen("D:\\output.txt", "w", stdout);
#endif
	int t = 1;
	// cin >> t;
	while (t--)
	{
		ll n, m;
		cin >> n >> m;
		if (n == m)
			cout << "Draw";
		else if (n > m and m != 1)
			cout << "Alice";
		else if (m > n or m == 1)
			cout << "Bob";
	}
	return 0;
}


/*
 ▓█████▄  ▄████▄  ▓██   ██▓ ██▓███   ██░ ██ ▓█████  ██▀███
▒██▀ ██▌▒██▀ ▀█   ▒██  ██▒▓██░  ██▒▓██░ ██▒▓█   ▀ ▓██ ▒ ██▒
 ░██   █▌▒▓█    ▄   ▒██ ██░▓██░ ██▓▒▒██▀▀██░▒███   ▓██ ░▄█ ▒
 ░▓█▄   ▌▒▓▓▄ ▄██▒  ░ ▐██▓░▒██▄█▓▒ ▒░▓█ ░██ ▒▓█  ▄ ▒██▀▀█▄
 ░▒████▓ ▒ ▓███▀ ░  ░ ██▒▓░▒██▒ ░  ░░▓█▒░██▓░▒████▒░██▓ ▒██▒
  ▒▒▓  ▒ ░ ░▒ ▒  ░   ██▒▒▒ ▒▓▒░ ░  ░ ▒ ░░▒░▒░░ ▒░ ░░ ▒▓ ░▒▓░
  ░ ▒  ▒   ░  ▒    ▓██ ░▒░ ░▒ ░      ▒ ░▒░ ░ ░ ░  ░  ░▒ ░ ▒░
  ░ ░  ░ ░         ▒ ▒ ░░  ░░        ░  ░░ ░   ░     ░░   ░
    ░    ░ ░       ░ ░               ░  ░  ░   ░  ░   ░
  ░      ░         ░ ░
*/
//focus less on how much problem you should solve within a fixed time and focus more on getting the problem solved and
//learning something from it
#include<bits/stdc++.h>
using namespace std;
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
#define rep(i,a,b) for(ll i=a; i<b; i++)
#define per(i,a,b) for(ll i=a; i>=b; i--)
#define ll long long int
#define ld long double
#define vi vector<ll>
#define pi pair<ll,ll>
#define vii vector <pair<ll,ll> >
#define sedes set <ll, greater <ll> >
#define seasc set <ll>
#define pb push_back
#define mkp make_pair
#define ff first
#define ss second
#define MOD 1000000007
#define prec(n) fixed<<setprecision(n)
#define maxpq priority_queue<int>
#define minpq priority_queue<int, vector<int>, greater<int> >
#define umap unordered_map<ll, ll>
#define map map<ll, ll>
#define autoit(x,it) for(auto it = x.begin(); it != x.end(); it++)
#define mems(a, i) memset(a, i, sizeof(a))
#define endl '\n'
#define all(v) v.begin(),v.end()
#define gcd(a,b) __gcd((a),(b))
#define lcm(a,b) ((a)*(b))/gcd((a),(b))
#define deba(a) cout << #a << " " <<a << endl;
int main()
{
	fast;
#ifndef ONLINE_JUDGE
	freopen("D:\\input.txt", "r", stdin);
	freopen("D:\\output.txt", "w", stdout);
#endif
	int t = 1;
	// cin >> t;
	while (t--)
	{
		ll n, m;
		cin >> n >> m;
		if (n > m and m != 1)
			cout << "Alice";
		else if (m > n or m == 1)
			cout << "Bob";
		else
			cout << "Draw";
	}
	return 0;
}


#include<stdio.h>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<algorithm>
#include<cmath>
#include<bitset>
#include<set>

#define Vsort(a) sort(a.begin(), a.end())
#define Vreverse(a) reverse(a.begin(), a.end())
#define Srep(n) for(int i = 0; i < (n); i++)
#define Lrep(i,a,n) for(int i = (a); i < (n); i++)
#define Brep(n) for(int bit = 0; bit < (1<<n); bit++)
#define rep2nd(n,m) Srep(n) Lrep(j,0,m)
#define vi vector<int>
#define vi64 vector<int64_t>
#define vvi vector<vector<int>>
#define vvi64 vector<vector<int64_t>>
#define P pair<int,int>
#define F first
#define S second

using namespace std;

int main(){
  int a,b;
  cin >> a >> b;
  if(a == b){
    cout << "Drow" << endl;
    return 0;
  }
  if(a == 1){
    cout << "Alice" << endl;
    return 0;
  }
  if(b == 1){
    cout << "Bob" << endl;
    return 0;
  }
  cout << (a > b ? "Alice" : "Bob") << endl;
}


#include <stdio.h>

int main(void) {
	int A, B;
	if (scanf("%d%d", &A, &B) != 2) return 1;
	if (A == 1) A = 999;
	if (B == 1) B = 999;
	puts(A > B ? "Alice" : (A < B ? "Bob" : "Draw"));
	return 0;
}


#include <stdio.h>
int main(void){
    int ans=0;
    int a,b;
    scanf("%d %d",&a,&b);
    if(a==1){
        a=100;
    }
    if(b==1){
        b=100;
    }
    if(a>b){
        printf("Alice\n");
    }else if(a<b){
        printf("Bob\n");
    }else{
        printf("Draw\n");
    }

    return 0;
}


#include <stdio.h>

int main(int argc, char const *argv[]) {
  int a, b;

  scanf("%d", &a);
  if(a == 1)
    a = 14;
  scanf("%d", &b);
  if(b == 1)
    b = 14;

  if (a > b)
    printf("Alice\n");
  else if(a == b)
    printf("Draw\n");
  else
    printf("Bob\n");

  return 0;
}


#include <stdio.h>

int main () {
	int a, b;
	scanf("%d %d", &a, &b);
	if (a == b) {
		puts("Draw");
	}
	else if (b >= 13) {
		puts("Alice");
	}
	else if (a >= 13) {
		puts("Bob");
	}
	else if (a > b) {
		puts("Alice");
	}
	else {
		puts("Bob");
	}
	return 0;
}


#include <stdio.h>

int main () {
	int a, b;
	scanf("%d %d", &a, &b);
	if (b >= 13) {
		puts("Alice");
	}
	else if (a >= 13) {
		puts("Bob");
	}
	else if (a > b) {
		puts("Alice");
	}
	else if (b > a) {
		puts("Bob");
	}
	else {
		puts("Draw");
	}
	return 0;
}


#include <iostream>
#include <bits/c++io.h>
#include <algorithm>
#include <iomanip>
#include <math.h>
using namespace std;

int main()
{
 int x,y;
 cin>>x>>y;
if(x==y)
    cout<<"Draw"<<endl;
  else  if(x==1) cout<<"Alice"<<endl;
  else  if(y==1) cout<<"Bob"<<endl;
  else {
      if(x>y) cout<<"Alice"<<endl;
      else cout<<"Bob"<<endl;

      }

}


"use strict";
const Main = (input) => {
	let xs = input.trim().split(' ').map(v=>parseInt(v,10));
    let ans0 = xs[0];
    let ans1 = xs[1];

    if(xs[0] == 1){
    	ans0 = xs[0] + 13;
    }

    if(xs[1] == 1){
        ans1 = xs[1] + 13;
    }

    if(ans0 == ans1){
        console.log('Draw');
    }else if(ans0 > ans1){
        console.log('Alice');
    }else{
    	console.log('Bob');
    }
}
Main(require('fs').readFileSync('/dev/stdin','utf8'));


'use strict'

function main(s) {

  s = s.split('\n')[0].split(' ').map(n => Number(n));

  let a = s[0];
  let b = s[1];

  if (a === 1) a += 13;
  if (b === 1) b += 13;

  let ans = '';

  if (a > b)   ans = 'Alice';
  if (a < b)   ans = 'Bob';
  if (a === b) ans = 'Draw';

  console.log(ans);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


function main(input){
    var A = parseInt(input.split("\n")[0].split(" ")[0]);
    var B = parseInt(input.split("\n")[0].split(" ")[1]);

    if(A == 1) A = 14;
    if(B == 1) B = 14;

    if(A == B) {
        console.log("Draw");
    } else if(A > B) {
        console.log("Alice")
    } else {
        console.log("Bob")
    }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input){
  var args = input.split(" ");
  var A = parseInt(args[0]),
      B = parseInt(args[1]);

  if (A == 1)
    A = 14;
  if (B == 1)
    B = 14;
  cobsole.log(A == B ? "Draw" : A > B ? "Alice" : "Bob");
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main(input){
  var args = input.split(" ");
  var A = parseInt(args[0]),
      B = parseInt(args[1]);

  if (A == 1)
    A = 14;
  if (B == 1)
    B = 14;
  cobsole.log(a == b ? "Draw" : a > b ? "Alice" : "Bob");
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function main (input){
  var args = input.split(" ");
  var A = parseInt(args[0]),
      B = parseInt(args[1]);

  if (A == 1)
    A = 14;
  if (B == 1)
    B == 14;

  if (A == B){
    console.log("Draw");
  }else if (A > B){
    console.log("Alice");
  }else{
    console.log("Bob")
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));


// +build ignore
package main

import (
	"bufio"
	"fmt"
	"io"
	"os"
	"strconv"
)

// I/O
type Scanner struct {
	sc *bufio.Scanner
}

func NewScanner() *Scanner {
	sc := bufio.NewScanner(os.Stdin)
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 1024), int(1e+9))
	return &Scanner{sc}
}

func (s *Scanner) nextStr() string {
	s.sc.Scan()
	return s.sc.Text()
}

func (s *Scanner) nextInt() int {
	i, e := strconv.Atoi(s.nextStr())
	if e != nil {
		panic(e)
	}
	return i
}

func (s *Scanner) nextFloat() float64 {
	f, e := strconv.ParseFloat(s.nextStr(), 64)
	if e != nil {
		panic(e)
	}
	return f
}

func (s *Scanner) nextRuneSlice() []byte {
	return []byte(s.nextStr())
}

func (s *Scanner) nextIntSlice(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextInt()
	}
	return res
}

func (s *Scanner) nextFloatSlice(n int) []float64 {
	res := make([]float64, n)
	for i := 0; i < n; i++ {
		res[i] = s.nextFloat()
	}
	return res
}

func gcd(x, y int) int {
	if x%y != 0 {
		return gcd(y, x%y)
	}
	return y
}

func run(input io.Reader, output io.Writer) int {
	sc := NewScanner()
	A := sc.nextInt()
	B := sc.nextInt()

	if A == 1 {
		A = 14
	}

	if B == 1 {
		B = 14
	}

	switch {
	case A > B:
		fmt.Println("Alice")
	case A < B:
		fmt.Println("Bob")
	default:
		fmt.Println("Draw")
	}

	return 0
}

func main() {
	os.Exit(run(os.Stdin, os.Stdout))
}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"reflect"
	"sort"
	"strconv"
	"strings"
	// "regexp"
)

/* sort */
type pair struct {
	index  int64
	p1, p2 interface{}
}
type pairs []pair

func (slice pairs) Len() int {
	return len(slice)
}

func (slice pairs) Less(i, j int) bool {
	return slice[i].index < slice[j].index
}

func (slice pairs) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}

/* sort */
type Int64Slice []int64

func (slice Int64Slice) Len() int {
	return len(slice)
}

func (slice Int64Slice) Less(i, j int) bool {
	return slice[i] < slice[j]
}

func (slice Int64Slice) Swap(i, j int) {
	slice[i], slice[j] = slice[j], slice[i]
}
func Int64s(a []int64)                    { sort.Sort(Int64Slice(a)) }
func Int64sSliceAreSorted(a []int64) bool { return sort.IsSorted(Int64Slice(a)) }

const (
	initialBufSize = 1e4
	maxBufSize     = 1e8
	INF            = 1e8
)

var (
	scanner = bufio.NewScanner(os.Stdin)
	writer  = bufio.NewWriter(os.Stdout)
	di      = []int64{-1, 0, 1, 0}
	dj      = []int64{0, -1, 0, 1}
)

func main() {
	buf := make([]byte, initialBufSize)
	scanner.Buffer(buf, maxBufSize)
	scanner.Split(bufio.ScanWords)
	A, B := readInt(), readInt()
	if A == B {
		fmt.Println("Draw")
	} else {
		if A == 1 {
			fmt.Println("Alice")
			return
		}
		if B == 1 {
			fmt.Println("Bob")
			return
		}
		if A > B {
			fmt.Println("Alice")
		} else {
			fmt.Println("Bob")
		}
	}
}

/*==========================================
 *             Library
 *==========================================*/
func NextPermutation(x sort.Interface) bool {
	n := x.Len() - 1
	if n < 1 {
		return false
	}
	j := n - 1
	for ; !x.Less(j, j+1); j-- {
		if j == 0 {
			return false
		}
	}
	l := n
	for !x.Less(j, l) {
		l--
	}
	x.Swap(j, l)
	for k, l := j+1, n; k < l; {
		x.Swap(k, l)
		k++
		l--
	}
	return true
}
func doubleAry(h int64, w int64, init int64) (res [][]int64) {
	res = make([][]int64, h)
	for i := int64(0); i < h; i++ {
		res[i] = make([]int64, w)
		for j := int64(0); j < w; j++ {
			res[i][j] = init
		}
	}
	return
}

func aryEq(a []int64, b []int64) bool {
	return reflect.DeepEqual(a, b)
}

func clone(n []int64) (r []int64) {
	r = make([]int64, len(n))
	for i := 0; i < len(n); i++ {
		r[i] = n[i]
	}
	return
}
func write(s string) {
	writer.WriteString(s)
}

func print() {
	writer.Flush()
}

// scanner.Split(bufio.ScanWords) をコメントアウトしないと使用不可
func readLine() (s string) {
	if scanner.Scan() {
		s = scanner.Text()
	}
	return s
}

func readInt() (read int64) {
	scanner.Scan()
	read, err := strconv.ParseInt(scanner.Text(), 10, 64)
	if err != nil {
		panic(err)
	}
	return
}

func readFloat() (read float64) {
	scanner.Scan()
	read, err := strconv.ParseFloat(scanner.Text(), 64)
	if err != nil {
		panic(err)
	}
	return
}

func readRunes() (read []rune) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, v)
	}
	return
}

func readString() (read string) {
	scanner.Scan()
	read = scanner.Text()
	return
}

func readStrings() (read []string) {
	scanner.Scan()
	for _, v := range scanner.Text() {
		read = append(read, string(v))
	}
	return
}

func s2i(s string) int64 {
	var intVal, e = strconv.ParseInt(s, 10, 64)
	if e != nil {
		panic(e)
	}
	return intVal
}

func i2s(i int64) string {
	var strVal = strconv.FormatInt(i, 10)
	return strVal
}

func s2f(s string) float64 {
	var floatVal, e = strconv.ParseFloat(s, 64)
	if e != nil {
		panic(e)
	}
	return floatVal
}

func abs(i int64) int64 {
	return int64(math.Abs(float64(i)))
}

func max(a ...int64) int64 {
	ans := int64(0)
	for i, v := range a {
		if i == 0 {
			ans = v
		}
		if ans < v {
			ans = v
		}
	}
	return ans
}
func min(a ...int64) int64 {
	ans := int64(0)
	for i, v := range a {
		if i == 0 {
			ans = v
		}
		if ans > v {
			ans = v
		}
	}
	return ans
}

func sum(i []int64) int64 {
	sum := int64(0)
	for _, val := range i {
		sum += val
	}
	return sum
}

func split(s string) []string {
	return strings.Fields(s)
}

func strAry2intAry(strs []string) []int64 {
	var ret = make([]int64, 0, len(strs))
	for _, str := range strs {
		var intVal = s2i(str)
		ret = append(ret, intVal)
	}
	return ret
}

func intAry2strAry(nums []int64) []string {
	var ret = make([]string, 0, len(nums))
	for _, num := range nums {
		var strVal = i2s(num)
		ret = append(ret, strVal)
	}
	return ret
}

func ary2str(strs []string) string {
	return strings.Join(strs, " ")
}

func reverse(res []int64) []int64 {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}
func reverseStr(res []string) []string {
	for i, j := 0, len(res)-1; i < j; i, j = i+1, j-1 {
		res[i], res[j] = res[j], res[i]
	}
	return res
}

func ini(res []int, init int) {
	if len(res) == 0 {
		return
	}
	res[0] = init
	for i := 0; i < len(res); i++ {
		copy(res[i:], res[:i])
	}
}

//
// func regexpExample() {
//     // Your code here!
//     var str = "13:20"
//     r := regexp.MustCompile(`(\d+):(\d+)`)
//     fmt.Println(r.FindStringSubmatch(str))
// }

// type Country struct {
//     gold int
//     silver int
//     blonze int
// }

// // 複数ソートのサンプル
// func stableSortExample() []Country{
//     var country = []Country {
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:2, blonze:3},
//         {gold:1, silver:3, blonze:2},
//         {gold:1, silver:3, blonze:3},
//     }
//     sort.SliceStable(country, func(i, j int) bool { return country[i].blonze > country[j].blonze })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].silver > country[j].silver })
//     sort.SliceStable(country, func(i, j int) bool { return country[i].gold > country[j].gold })
//     return country
// }


package main

import (
	"fmt"
)

func main() {
	var a, b int
	fmt.Scan(&a, &b)

	if a == 1 {
		a = 14
	}
	if b == 1 {
		b = 14
	}

	if a == b {
		fmt.Println("Draw")
	} else if a > b {
		fmt.Println("Alice")
	} else {
		fmt.Println("Bob")
	}
}


package main

import (
	"fmt"
)

func main() {
	var a, b int
	fmt.Scan(&a, &b)

	if a == b {
		fmt.Println("Draw")
	} else if (a != 1 && a > b) || a == 1 {
		fmt.Println("Alice")
	} else {
		fmt.Println("Bob")
	}
}


package main

import (
	"fmt"
)

func main() {
	var a, b int
	fmt.Scan(&a, &b)

	if a == b {
		fmt.Println("Draw")
	} else if a > b || a == 1 {
		fmt.Println("Alice")
	} else {
		fmt.Println("Bob")
	}
}


package main

import "fmt"

func main() {
	var a, b int
	fmt.Scanf("%d %d", &a, &b)
	if a > b {
		fmt.Println("Alice")
	} else if  a < b {
    fmt.Println("Bob")
	} else {
		fmt.Println("Draw")
	}
}


x,y = gets.chomp.split.map(&:to_i)
cards_force = [2,3,4,5,6,7,8,9,10,11,12,13,1]
a = cards_force.index(x)
b = cards_force.index(y)

if a < b
  puts "Bob"
elsif a == b
  puts "Draw"
else
  puts "Alice"
end


m=gets.split.map(&:to_i)
m=m.map{|n|n==1 ?n=14:n=n}
puts
if m[0]>m[1]
    puts "Alice"
elsif m[0]==m[1]
    puts "Draw"
else
   puts "Bob"
end


a, b = gets.split(" ").map(&:to_i)
a = (a == 1 ? 14 : a)
b = (b == 1 ? 14 : b)
puts a > b ? "Alice" : (a == b ? "Draw" : "Bob")


n,m = gets.strip.split.map(&:to_i)
if n==1
  n = 14
end
if m==1
  m = 14
end
if n < m
  puts "Bob"
elif n == m
  puts "Draw"
else
  puts "Alice"
end


a,b=gets.split.map do |i|
  return 14 if i.to_i == 1
  i.to_i
end
puts a==b ? "Draw" : [a,b].sort==[a,b] ? "Bob" : "Alice"


a,b=gets.split.map do |i|
  i.to_i
  14 if i.to_i == 1
end
puts a==b ? "Draw" : [a,b].sort==[a,b] ? "Bob" : "Alice"


use std::io;

fn procon_read<T: std::str::FromStr>() ->  Vec<T> {
	let mut buf = String::new();
	io::stdin().read_line(&mut buf).expect("");
	let iter = buf.split_whitespace();
	let mut v: Vec<T> = Vec::new();
	for i in iter {
		v.push(i.parse().ok().unwrap());
	}
	v
}

fn main() {
	let v:Vec<i32> = procon_read();
	let mut a = v[0];
	let mut b = v[1];
	if a == 1 {
		a += 13;
	}
	if b == 1 {
		b += 13;
	}
	if a < b {
		println!("Bob");
	}else if a > b {
		println!("Alice");
	}else{
		println!("Draw");
	}
}


//  ____            _                  _                       _       _
// |  _ \ _   _ ___| |_    ___ _ __   | |_ ___ _ __ ___  _ __ | | __ _| |_ ___
// | |_) | | | / __| __|  / __| '_ \  | __/ _ \ '_ ` _ \| '_ \| |/ _` | __/ _ \
// |  _ <| |_| \__ \ |_  | (__| |_) | | ||  __/ | | | | | |_) | | (_| | ||  __/
// |_| \_\\__,_|___/\__|  \___| .__/___\__\___|_| |_| |_| .__/|_|\__,_|\__\___|
//                            |_| |_____|               |_|

//https://github.com/manta1130/Competitive_Programming_Template_Rust

#[macro_use]
mod input {

    use std;
    use std::io;

    const SPLIT_DELIMITER: char = ' ';

    #[macro_export]
    #[allow(unused_macros)]
    macro_rules! input {
    ( $($x:expr ),*) => {
        {
            let temp_str = input_line_str();
            let mut split_result_iter = temp_str.split_whitespace();
                $(
                let buf_split_result = split_result_iter.next();
                let buf_split_result = buf_split_result.unwrap();
                    ($x) = buf_split_result.parse().unwrap();
                )*
        }
    };
}

    #[allow(dead_code)]
    pub fn input_line_str() -> String {
        let mut s = String::new();
        io::stdin().read_line(&mut s).unwrap();
        s.trim().to_string()
    }

    #[allow(dead_code)]
    pub fn p<T>(t: T)
    where
        T: std::fmt::Display,
    {
        println!("{}", t);
    }

    #[allow(dead_code)]
    pub fn input_vector2d<T>(line: usize) -> Vec<Vec<T>>
    where
        T: std::str::FromStr,
    {
        let mut v: Vec<Vec<T>> = Vec::new();

        for _ in 0..line {
            let vec_line = input_vector();
            v.push(vec_line);
        }
        v
    }

    #[allow(dead_code)]
    pub fn input_vector<T>() -> Vec<T>
    where
        T: std::str::FromStr,
    {
        let mut v: Vec<T> = Vec::new();

        let s = input_line_str();
        let split_result = s.split(SPLIT_DELIMITER);
        for z in split_result {
            let buf = match z.parse() {
                Ok(r) => r,
                Err(_) => panic!("Parse Error"),
            };
            v.push(buf);
        }
        v
    }

    #[allow(dead_code)]
    pub fn input_vector_row<T>(n: usize) -> Vec<T>
    where
        T: std::str::FromStr,
    {
        let mut v = Vec::with_capacity(n);
        for _ in 0..n {
            let buf = match input_line_str().parse() {
                Ok(r) => r,
                Err(_) => panic!("Parse Error"),
            };
            v.push(buf);
        }
        v
    }

    pub trait ToCharVec {
        fn to_charvec(&self) -> Vec<char>;
    }

    impl ToCharVec for String {
        fn to_charvec(&self) -> Vec<char> {
            self.to_string().chars().collect::<Vec<_>>()
        }
    }
}

use input::*;
use std::cmp::Ordering;

fn main() {
    let (mut a, mut b): (usize, usize);
    input!(a, b);
    if a == 1 {
        a = 99;
    }
    if b == 1 {
        b = 99;
    }
    println!(
        "{}",
        match a.cmp(&b) {
            Ordering::Greater => "Alice",
            Ordering::Less => "Bob",
            _ => "Draw",
        }
    );
}


use std::io::*;
use std::str::*;

fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let s = stdin
        .bytes()
        .map(|c| c.unwrap() as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect::<String>();
    s.parse::<T>().ok().unwrap()
}

fn main() {
    let a: i32 = read();
    let b: i32 = read();

    if a == b {
        println!("Draw");
        return;
    }

    if a == 1 {
        println!("Alice");
        return;
    }
    if b == 1 {
        println!("Bob");
        return;
    }
    println!("{}", if a > b { "Alice" } else { "Bob" })
}


use proconio::input;

fn main() {
    input! {
        a: i32,
        b: i32,
    }

    let answer = if a < b {
        "Alice"
    } else if a > b {
        "Bob"
    }else{
 		 "Draw"
  	};
    println!("{}", answer)
}


#![allow(unused, non_snake_case, dead_code, non_upper_case_globals)]
use std::cmp::*;
use std::collections::*;
use std::mem::*;

fn main() {
    let (r, w, e) = (std::io::stdin(), std::io::stdout(), std::io::stderr());
    let mut io = IO::new(r.lock(), w.lock(), e.lock());
    assert_eq!(!0usize, std::usize::MAX); //🙊

    let (a,b) = (io.read::<i64>(),io.read::<i64>());

    if a==b {
        io.writeln("Draw");
    }
    if a == 1 || a > b{
        io.writeln("Alice");
    }else {
        io.writeln("Bob");}

}

static MOD: i64 = 1000000007;
static INF: i64 = std::i64::MAX >> 1;
// IO
use std::io::*;
struct IO<R: Read, W: Write, E: Write> {
    Read: R,
    Write: BufWriter<W>,
    Error: BufWriter<E>,
}
impl<R: Read, W: Write, E: Write> IO<R, W, E> {
    fn new(r: R, w: W, e: E) -> IO<R, W, E> {
        IO {
            Read: r,
            Write: BufWriter::new(w),
            Error: BufWriter::new(e),
        }
    }
    fn read<T>(&mut self) -> T
    where
        T: std::str::FromStr,
    {
        let next: String = self
            .Read
            .by_ref()
            .bytes()
            .map(|c| c.unwrap() as char)
            .skip_while(|c| c.is_whitespace())
            .take_while(|c| !c.is_whitespace())
            .collect();
        next.parse().ok().unwrap()
    }
    fn chars(&mut self) -> Vec<char> {
        self.read::<String>().chars().collect()
    }
    fn chari(&mut self) -> Vec<i64> {
        self.chars()
            .iter()
            .map(|&c| (c as u8 - b'0') as i64)
            .collect::<Vec<i64>>()
    }
    fn readn<T: std::str::FromStr>(&mut self, n: usize) -> Vec<T> {
        (0..n).map(|_| self.read::<T>()).collect::<Vec<_>>()
    }
    fn readmat<T: std::str::FromStr>(&mut self, n: usize, m: usize) -> Vec<Vec<T>> {
        (0..n).map(|_| self.readn(m)).collect()
    }
    fn write<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
    }
    fn writeln<S: ToString>(&mut self, val: S) {
        self.Write.write(val.to_string().as_bytes());
        self.Write.write(b"\n");
    }
    fn debug<S: std::fmt::Debug>(&mut self, val: S) {
        writeln!(self.Error, "(debug) {:?}", &val);
    }
    fn debug2<S: std::fmt::Debug, T: std::fmt::Debug>(&mut self, val1: S, val2: T) {
        writeln!(self.Error, "(debug2) {:?} -> {:?}", val1, val2);
    }
    fn debug3<S: std::fmt::Debug, T: std::fmt::Debug, U: std::fmt::Debug>(
        &mut self,
        val1: S,
        val2: T,
        val3: U,
    ) {
        writeln!(
            self.Error,
            "(debug3) {:?} -> {:?} -> {:?}",
            val1, val2, val3
        );
    }
}


use std::io::*;
use std::str::FromStr;

pub fn read<T: FromStr>() -> T {
    let stdin = stdin();
    let stdin = stdin.lock();
    let token: String = stdin
        .bytes()
        .map(|c| c.expect("failed to read char") as char)
        .skip_while(|c| c.is_whitespace())
        .take_while(|c| !c.is_whitespace())
        .collect();
    token.parse().ok().expect("failed to parse token")
}

fn main() {
    let a: usize = read();
    let b: usize = read();
    if a == b {
        println!("Draw");
        return;
    }

    if a == 1 || a > b {
        println!("Alice");
        return;
    }

    if b == 1 || b > a {
        println!("Bob");
        return;
    }
}


let i=readLine()!.characters.split(" ").map{Int(String($0))!}.map{$0>1 ?$0:14};print(i[0]>i[1] ?"Alice":(i[0]<i[1] ?"Bob":"Draw"))


let i=readLine()!.characters.split(" ").map{Int(String($0))!}.map{$0>1 ?$0:14};print(i[0]-i[1]>0 ?"Alice":(i[0]-i[1]<0 ?"Bob":"Draw"))


let input = readLine()!.split(separator: " ").map{ Int($0)! }
let A = input[0]
let B = input[1]

func getStrength(_ value: Int) -> Int {
    if value == 1 {
        return 13
    } else {
        return value - 1
    }
}

let strengthA = getStrength(A)
let strengthB = getStrength(B)

if strengthA == strengthB {
    print("Draw")
} else {
    print(strengthA > strengthB ? "Alice" : "Bob")
}


let i=readLine()!.characters.split(" ").map{Int(String($0))!}.map{i i>1 ?i:i+2};print(i[0]-i[1]>0 ?"Alice":(i[0]-i[1]<0 ?"Bob":"Draw"))


const main = (input) => {
  input = input.split(' ');
  const A = parseInt(input[0], 10);
  const B = parseInt(input[1], 10);

  if(A == 1) A = 14;
  if(B == 1) B = 14;

  if (A>B) {
    console.log("Alice");
  }else if(A<B) {
    console.log("Bob");
  }else{
    console.log("Draw");
  }

}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


const input=require('fs').readFileSync('/dev/stdin', 'utf8').split(/[\s]/);const nin=()=>{const r = input[0];input.shift();return Number(r)};const nrin=(n)=>{const a:number[]=[];rep(n,()=>a.push(nin()));return a};const sin=()=>{const r = input[0];input.shift();return String(r)};const out=(...a)=>{console.log(...a)};const floor=(a)=>{return Math.floor(a)};const abs=(a)=>{return Math.abs(a)};const min=(...a)=>{return Math.min(...a)};const max=(...a)=>{return Math.max(...a)};const rep=(n, callback)=>{for(let i = 0;i < n; i++){callback()}};const strrep=(s, i, v)=>{return s.slice(0, i)+v+s.slice(i+1);};const permutation=({result=[],pre=[],post,n=post.length})=>{if(n>0){post.forEach((_,i)=>{const rest=[...post];const elem=rest.splice(i, 1);permutation({result, pre: [...pre,...elem],post:rest,n:n-1})})}else{result.push(pre)}return result};const sw=(s,a:any[],op:'=='|'>='|'>'|'<='|'<'='==')=>{for(let i=0;i<a.length;i+=2){if(op==='=='){if(s==a[i])return a[i+1]}else if(op==='>='){if(s>=a[i])return a[i+1]}else if(op==='<='){if(s<=a[i])return a[i+1]}else if(op==='>'){if(s>a[i])return a[i+1]}else if(op==='<'){if(s<a[i])return a[i+1]}}return a[a.length-1];};const or=(a,...b)=>{for(let i=0;i<b.length;i++)if(a==b[i])return true;return false};const maxindex=(...a)=>{return a.indexOf(Math.max.apply(null,a))};const asc=(ar:number[])=>{return ar.sort((a,b)=>{return a-b})};const desc=(ar:number[])=>{return ar.sort((a,b)=>{return b-a})};const ceil=a=>{return Math.ceil(a)};const srin=s=>{const a:string[]=[];rep(s,()=>a.push(sin()));return a};let ssinteger=-1;const ssin=()=>{ssinteger++;return input[0][ssinteger]};
const main = ()=>{
  let[a,b]=nrin(2)
  if(a==1)a=14
  if(b==1)b=14
  out(a==b?'Draw':a>b?'Alice':'Bob')
}
main()


var input: string = require('fs').readFileSync('/dev/stdin', 'utf8');
var inputLines: string[] = input.trim().split("\n");
var parts = inputLines[0].split(" ");

var A = parseInt(parts[0]);
var B = parseInt(parts[1]);

var ans = A >= B ? "Alice" : "Bob";
if (A == B) {
    ans = "Draw";
} else if (A == 1) {
    ans = "Alice";
} else if (B == 1) {
    ans = "Bob";
}

console.log(ans);


const main = (input) => {
  input = input.split(' ');
  const A = parseInt(input[0], 10);
  const B = parseInt(input[1], 10);

  if (A>B) {
    console.log("Alice");
  }else if(A<B) {
    console.log("Bob");
  }else{
    console.log("Draw");
  }

}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


import * as fs from "fs"

function Main(input: string) {

  const [y, ...x] = input.split("\n")

  const [n, m] = y.split(" ").map(str => parseInt(str, 10))

  const a = x.slice(0, n)
  const b = x.slice(n, n + m)

  let flag = false

  for (let i = 0; i < n - m + 1; i++) {
    const start = a[i].indexOf(b[0])
    if (start > -1) {
      // console.log(start)
      if (m === 1) flag = true
      for (let j = i + 1; j < n; j++) {
        if (a[j].indexOf(b[j - i], start) == 0) {
          if (j - i === m - 1) {
            flag = true
          }
        }
      }
    }
  }

  if (flag) console.log("Yes")
  else console.log("No")

}

fs.readFile('/dev/stdin', (err, data) => {
  if (err) {
    Main(fs.readFileSync('./input.txt', 'utf8'))
    return null
  }
  Main(data.toString())
  return null
})


var input: string = require('fs').readFileSync('/dev/stdin', 'utf8');
var inputLines: string[] = input.trim().split("\n");
var parts = inputLines[0].split(" ");

var A = parseInt(parts[0]);
var B = parseInt(parts[1]);

var ans = A >= B ? "Alice" : "Bob";
if (A == B) {
    ans = "Draw";
} else if (B == 1) {
    ans = "Bob";
}

console.log(ans);


import sys

inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

n, m = inintm()

t = [0]*(n+1)

for _ in range(m):
    a, b = inintm()
    if a == 1:
        if t[b] == 1:
            print("POSSIBLE")
            exit()
        t[b] = 1
    elif b == n:
        if t[a] == 1:
            print("POSSIBLE")
            exit()
        t[a] = 1

print("IMPOSSIBLE")


# ABC068C - Cat Snuke and a Voyage (ARC079C)
def main():
    N, M, *AB = map(int, open(0).read().split())
    sources, targets = set(), set()
    for a, b in zip(*[iter(AB)] * 2):
        if a == 1:
            sources.add(b)
        if b == N:
            targets.add(a)
    flg = sources & targets  # intermediate point of both 1, N exists?
    print("POSSIBLE" if flg else "IMPOSSIBLE")

if __name__ == "__main__":
    main()


def main():
  N, M, *AB = map(int, open(0).read().split())

  inter, goalable = set(), set()

  iterator = iter(AB)
  for a, b in zip(iterator, iterator):
    if a == 1:
      inter.add(b)

    if b == N:
      goalable.add(a)

  flag = inter & goalable
  print("POSSIBLE" if flag else "IMPOSSIBLE")

if __name__ == "__main__":
    main()


from collections import deque

n,m = map(int, input().split())
G = [[] for _ in range(n)]
for i in range(m):
    a,b = map(int, input().split())
    a-=1
    b-=1
    G[a].append(b)
    G[b].append(a)

dist = [-1]*n
que = deque()
dist[0]=0
que.append(0)
while len(que):
    v = que.pop()
    for node in G[v]:
        if dist[node]==-1:
            dist[node]=dist[v]+1
            que.append(node)

if dist[-1]==2:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")


from collections import deque

n,m = map(int, input().split())
G = [[] for _ in range(n)]
for i in range(m):
    a,b = map(int, input().split())
    a-=1
    b-=1
    G[a].append(b)
    G[b].append(a)

dist = [-1]*n
que = deque()
dist[0]=0
que.append(0)
while len(que):
    v = que.pop()
    for node in G[v]:
        if dist[node]==-1:
            dist[node]=dist[v]+1
            que.append(node)

if dist[-1]==1 or dist[-1]==2:
    print("POSSIBLE")
else:
    print("IMPOSSIBLE")


# -*- coding: utf-8 -*-
"""
Created on Sun Sep 27 02:05:32 2020

@author: liang
"""

N, M = map(int, input().split())
first = list()
second = set()

for i in range(M):
    a, b = map(int, input().split())
    if a == 1:
        first.append(b)
    if b == N:
        second.add(a)

for a in first:
    if a in second:
        print("POSSIBLE")
        break
else:
    print("INPOSSIBLE")


import java.util.*;
import java.io.*;

public class Main {
	public static void main(String[] args) {
		InputReader in = new InputReader(System.in);
		int n = in.readInt();
		int m = in.readInt();
		boolean sol[] = new boolean[n+1];
		boolean ans = false;
		for(int i = 0; i<m; i++) {
			int a = in.readInt();
			int b = in.readInt();
			if(a==1) {
				if(sol[b]) {
					ans = true;
				}
				sol[b] = true;
			}
			else if(b == n) {
				if(sol[a]) {
					ans = true;
				}
				sol[a] = true;
			}
		}
		System.out.println(ans?"POSSIBLE":"IMPOSSIBLE");
	}
}

class InputReader {

	private InputStream stream;
	private byte[] buf = new byte[1024];
	private int curChar;
	private int numChars;
	private SpaceCharFilter filter;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	public int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public int readInt() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		int res = 0;
		do {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public String readString() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		StringBuilder res = new StringBuilder();
		do {
			res.appendCodePoint(c);
			c = read();
		} while (!isSpaceChar(c));
		return res.toString();
	}

	public long readLong() {
		int c = read();
		while (isSpaceChar(c)) {
			c = read();
		}
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		long res = 0;
		do {
			if (c < '0' || c > '9') {
				throw new InputMismatchException();
			}
			res *= 10;
			res += c - '0';
			c = read();
		} while (!isSpaceChar(c));
		return res * sgn;
	}

	public boolean isSpaceChar(int c) {
		if (filter != null)
			return filter.isSpaceChar(c);
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}

	public String next() {
		return readString();
	}

	public interface SpaceCharFilter {
		public boolean isSpaceChar(int ch);
	}
}


import java.io.IOException;
import java.util.NoSuchElementException;

import java.io.InputStream;

import java.io.PrintWriter;

@SuppressWarnings("unchecked")
public class Main {
    public static void main(String[] args) throws IOException {
        PrintWriter out = new PrintWriter(System.out);

        final int N = nextInt();
        final int M = nextInt();

        boolean[] S = new boolean[N];
        boolean[] E = new boolean[N];

        for (int i = 0; i < M; i++) {
            int f = nextInt();
            int s = nextInt();

            if (f == 1) S[s] = true;
            else if (s == N) E[f] = true;
        }

        String ans = "IMPOSSIBLE";

        for (int i = 0; i < N; i++) {
            if (S[i] && E[i]) {
                ans = "POSSIBLE";
                break;
            }
        }

        out.println(ans);

        out.flush();
    }

    // FastScanner start
    static final InputStream in = System.in;
    static final byte[] buffer = new byte[1024];
    static int ptr = 0;
    static int buflen = 0;
    static boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        } else {
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    static int readByte() {
        if (hasNextByte()) return buffer[ptr++];
        else return -1;
    }
    static boolean isPrintableChar(int c) {
        return 33 <= c && c <= 126;
    }
    static boolean hasNext() {
        while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
        return hasNextByte();
    }
    static String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while (isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    static long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while (true) {
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            } else if(b == -1 || !isPrintableChar(b)) {
                return minus ? -n : n;
            } else {
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
    static int nextInt() {
        long nl = nextLong();
        if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
            throw new NumberFormatException();
        return (int) nl;
    }
    static double nextDouble() {
        return Double.parseDouble(next());
    }
    // FastScanner end
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.Closeable;
import java.io.IOException;
import java.util.NoSuchElementException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author HBonsai
 */
@SuppressWarnings("unchecked")
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        CCatSnukeAndAVoyage solver = new CCatSnukeAndAVoyage();
        solver.solve(1, in, out);
        out.close();
    }

    static class CCatSnukeAndAVoyage {
        public void solve(int testNumber, FastScanner in, PrintWriter out) {
            int N = in.nextInt();
            int M = in.nextInt();
            boolean[] oneToi = new boolean[N + 1];
            boolean[] iToN = new boolean[N + 1];
            for (int i = 0; i < M; i++) {
                int a = in.nextInt();
                int b = in.nextInt();
                if (a == 1) oneToi[b] = true;
                if (b == N) iToN[a] = true;
            }
            boolean reached = false;
            for (int i = 1; i < N; i++) {
                if (oneToi[i] && iToN[i]) {
                    reached = true;
                    break;
                }
            }
            out.println(reached ? "POSSIBLE" : "IMPOSSIBLE");
        }

    }

    static class FastScanner implements Closeable {
        private final InputStream in;
        private final byte[] buffer = new byte[1024];
        private int ptr = 0;
        private int buflen = 0;

        public FastScanner(InputStream in) {
            this.in = in;
        }

        private boolean hasNextByte() {
            if (ptr < buflen) {
                return true;
            } else {
                ptr = 0;
                try {
                    buflen = in.read(buffer);
                } catch (IOException e) {
                    e.printStackTrace();
                }
                if (buflen <= 0) {
                    return false;
                }
            }
            return true;
        }

        private int readByte() {
            if (hasNextByte()) return buffer[ptr++];
            else return -1;
        }

        private static boolean isPrintableChar(int c) {
            return 33 <= c && c <= 126;
        }

        public boolean hasNext() {
            while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
            return hasNextByte();
        }

        public long nextLong() {
            if (!hasNext()) throw new NoSuchElementException();
            long n = 0;
            boolean minus = false;
            int b = readByte();
            if (b == '-') {
                minus = true;
                b = readByte();
            }
            if (b < '0' || '9' < b) {
                throw new NumberFormatException();
            }
            while (true) {
                if ('0' <= b && b <= '9') {
                    n *= 10;
                    n += b - '0';
                } else if (b == -1 || !isPrintableChar(b)) {
                    return minus ? -n : n;
                } else {
                    throw new NumberFormatException();
                }
                b = readByte();
            }
        }

        public int nextInt() {
            long nl = nextLong();
            if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
            return (int) nl;
        }

        public void close() {
            try {
                in.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}


import java.util.*;
public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int M = sc.nextInt();
    int[] a = new int[M];
    int[] b = new int[M];
    List<Integer> list = new ArrayList<>();
    for(int i=0;i<M;i++){
      a[i] = sc.nextInt();
      b[i] = sc.nextInt();
      if(a[i]==1){
        list.add(i);
      }
    }
    String ans = "IMPOSSIBLE";
    for(int i=0;i<list.size();i++){
      for(int j=0;j<M;j++){
        if(a[j]==b[list.get(i)] && b[j]==N){
          ans = "POSSIBLE";
          break;
        }
      }
    }
    System.out.println(ans);
  }
}


import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	int m = scn.nextInt();
		int[] a = new int[m];
      	int[] b = new int[m];
		for(int i=0; i<m; i++){
			a[i] = scn.nextInt();
          	b[i] = scn.nextInt();
		}
      	ArrayList<Integer> list = new ArrayList<>();
      	for(int i=0; i<m; i++){
			if(a[i]==1) list.add(b[i]);
          	if(b[i]==n) list.add(a[i]);
		}
      	Collections.sort(list);
      	String ans = "IMPOSSIBLE";
      	for(int i=0; i<list.size()-1; i++){
          if(list.get(i) == list.get(i+1)){
            ans = "POSSIBLE";
            break;
          }
        }
      	System.out.println(ans);
	}
}


import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception{
		Scanner scn = new Scanner(System.in);
		int n = scn.nextInt();
      	int m = scn.nextInt();
		int[] a = new int[m];
      	int[] b = new int[m];
		for(int i=0; i<m; i++){
			a[i] = scn.nextInt();
          	b[i] = scn.nextInt();
		}
      	ArrayList<Integer> list = new ArrayList<>();
      	for(int i=0; i<m; i++){
			if(a[i]==1) list.add(b[i]);
          	if(b[i]==n) list.add(a[i]);
		}
      	Collections.sort(list);
      	String ans = "IMPOSSIBLE";
      	for(int i=0; i<list.size(); i++){
          if(list.get(i) == list.get(i+1)){
            ans = "POSSIBLE";
            break;
          }
        }
      	System.out.println(ans);
	}
}


#include <cstdio>
bool A[200001];
inline char tc(void){
  static char fl[10000],*A=fl,*B=fl;
  return A==B&&(B=(A=fl)+fread(fl,1,10000,stdin),A==B)?EOF:*A++;
}
inline int read(void){
  int a=0;static char c;
  while((c=tc())<'0'||c>'9');
  while(c>='0'&&c<='9')a=a*10+c-'0',c=tc();
  return a;
}
int main(){
  int n,m,a,b;n=read();m=read();
  while(m--){a=read();b=read();
    if(a==1){
      if(A[b]==true)return puts("POSSIBLE"),0;
      A[b]=true;
    }
    if(b==n){
      if(A[a]==true)return puts("POSSIBLE"),0;
      A[a]=true;
    }
  }
  puts("IMPOSSIBLE");
  return 0;
}


#include <cstdio>
bool A[200001];
inline char tc(){
  static char fl[100],*A=fl,*B=fl;
  return A==B&&(B=(A=fl)+fread(fl,1,100,stdin),A==B)?EOF:*A++;
}
inline int read(){
  int a=0;static char c;
  while((c=tc())<48||c>57);
  while(c>=48&&c<=57)a=a*10+c-48,c=tc();
  return a;
}
int main(){
  int n,m,a,b;n=read();m=read();
  while(m--){a=read();b=read();
    if(a==1){
      if(A[b])return puts("POSSIBLE"),0;
      A[b]=1;
    }
    if(b==n){
      if(A[a])return puts("POSSIBLE"),0;
      A[a]=1;
    }
  }
  puts("IMPOSSIBLE");
  return 0;
}


// C++ includes used for precompiling -*- C++ -*-

// Copyright (C) 2003-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.

// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

/** @file stdc++.h
 *  This is an implementation file for a precompiled header.
 */

// 17.4.1.2 Headers

// C
//デバッグ用オプション：-fsanitize=undefined,address

//コンパイラ最適化
#pragma GCC optimize("Ofast")
#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#if __cplusplus >= 201103L
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif

// C++
#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#if __cplusplus >= 201103L
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <scoped_allocator>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

/*全てのライブラリをインクルード*/
using namespace std;
using ll = long long;
//マクロ
//forループ
//引数は、(ループ内変数,動く範囲)か(ループ内変数,始めの数,終わりの数)、のどちらか
//Dがついてないものはループ変数は1ずつインクリメントされ、Dがついてるものはループ変数は1ずつデクリメントされる
//FORAは範囲for文(使いにくかったら消す)
#define rep(i,n) for(ll i=0;i<ll(n);i++)
#define REPD(i,n) for(ll i=n-1;i>=0;i--)
#define FOR(i,a,b) for(ll i=a;i<=ll(b);i++)
#define FORD(i,a,b) for(ll i=a;i>=ll(b);i--)
#define FORA(i,I) for(const auto& i:I)
//xにはvectorなどのコンテナ
#define ALL(x) x.begin(),x.end()
#define SIZE(x) ll(x.size())
//定数
#define INF 1000000000000 //10^12:∞
#define MOD 1000000007 //10^9+7:合同式の法
#define MAXR 100000 //10^5:配列の最大のrange
//略記
#define PB push_back //挿入
#define MP make_pair //pairのコンストラクタ
#define F first //pairの一つ目の要素
#define S second //pairの二つ目の要素

signed main(){
    //入力の高速化用のコード
    //ios::sync_with_stdio(false);
    //cin.tie(nullptr);
    int n,m;
    cin>>n>>m;
    bool a[n][n];
    rep(i,n){
        rep(j,n){
            a[i][j]=false;
        }
    }
    rep(i,m){
        int b,c;
        cin>>b>>c;
        a[b-1][c-1]=true;
    }
    rep(i,n){
        if(a[0][i]){
            if(a[i][n-1]){
                cout<<"POSSIBLE"<<endl;
                return 0;
            }
        }
    }
    cout<<"IMPOSSIBLE"<<endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ll long long
int main(){
  ll n,m;
  cin >> n >> m;
  vector<vector<ll>> G(n);
  rep(i,m){
    ll a,b;
    cin >> a >> b;
    a--;
    b--;
    G.at(a).push_back(b);
    G.at(b).push_back(a);
  }
  queue<ll> que;
  que.push(0);
  vector<ll> dist(n,-1);
  dist.at(0)=0;
  while(!que.empty()){
    ll v=que.front();
    que.pop();
    for(ll p: G[v]){
      if(dist.at(p)!=-1){
        continue;
      }
      dist.at(p)=dist.at(v)+1;
      que.push(p);
    }
  }
  string ans="IMPOSSIBLE";
  if(dist.at(n-1)<=2){
    ans="POSSIBLE";
  }
  cout << ans;
}


#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define rrep(i, n) for (int i = 1; i < (int)(n + 1); i++)
// vector<vector<int>> A(3, vector<int>(4));
struct UnionFind {
    vector<int> par; // par[i]:iの親の番号　(例) par[3] = 2 : 3の親が2

    UnionFind(int N) : par(N) { //最初は全てが根であるとして初期化
        for(int i = 0; i < N; i++) par[i] = i;
    }

    int root(int x) { // データxが属する木の根を再帰で得る：root(x) = {xの木の根}
        if (par[x] == x) return x;
        return par[x] = root(par[x]);
    }

    void unite(int x, int y) { // xとyの木を併合
        int rx = root(x); //xの根をrx
        int ry = root(y); //yの根をry
        if (rx == ry) return; //xとyの根が同じ(=同じ木にある)時はそのまま
        par[rx] = ry; //xとyの根が同じでない(=同じ木にない)時：xの根rxをyの根ryにつける
    }

    bool same(int x, int y) { // 2つのデータx, yが属する木が同じならtrueを返す
        int rx = root(x);
        int ry = root(y);
        return rx == ry;
    }
};

int main() {
    int N, M;
    cin >> N >> M;

    UnionFind tree(N);

    for(int i = 0; i < M; i++) {
        int  x, y;
        cin >> x >> y;
        tree.unite(x-1, y-1); // xの木とyの木を併合する
    }

    int cnt=0;
    for(int i=0;i<N;i++){
        if(!tree.same(0,i)){
            tree.unite(0, i);
            cnt++;
        }
    }
    if(cnt<=1){
        cout<<"POSSIBLE"<<endl;
    }
    else{
        cout<<"IMPOSSIBLE"<<endl;
    }
}


m[1<<18];*p;main(n,a,b){for(scanf("%d%*d",&n);~scanf("%d%d",&a,&b);p-m&&*p?n=0:++*p)p=m+(a-1?b-n?0:a:b);puts(n?"IMPOSSIBLE":"POSSIBLE");}


#include <stdio.h>
long flag[200000];

int main(void){
  long N,M;
  long a,b;
  scanf("%ld%ld",&N,&M);

  for(int i = 0;i < M;i++) flag[i] = 0;
  for(int i = 0;i < M;i++){
    scanf("%ld%ld",&a,&b);
    if(a == 1) flag[b-1]++;
    if(b == N) flag[a-1]++;
  }

  for(int i = 0;i < M;i++){
    if(flag[i] == 2){
      printf("POSSIBLE\n");
      return 0;
    }
  }
  printf("IMPOSSIBLE\n");

  return 0;
}


#include <stdio.h>

int aaa[200000] = {};

int main()
{
	long n, m;
	long x, y;
	int ans = 0;
	scanf("%ld %ld", &n, &m);
	for (long i = 0; i < m; i++)
	{
		scanf("%ld %ld", &x,&y);
		if (x == 1)
		{
			aaa[y]++;
		}
		if (y == n)
		{
			aaa[x]++;
		}
	}
	for (long i = 0; i < 200000; i++)
	{
		if (aaa[i] >= 2)
		{
			ans = 1;
			break;
		}
	}
	if (ans == 1)
	{
		printf("POSSIBLE");
	}
	else
	{
		printf("IMPOSSIBLE");
	}
	return 0;
}


#include<stdio.h>
int main()
{
    int i,j,k,c=0,n,t,fixed,half,m;
    scanf("%d %d",&m,&n);
    int array1[n],array2[n];
    for(i=0;i<n;i++){
        scanf("%d %d",&array1[i],&array2[i]);
    }
    fixed=m;
    for(i=0;i<n;i++){
        if(array1[i]==1){
            half=array2[i];
            for(j=0;j<n;j++){
                if((array1[j]==half)&&(array2[j]==fixed)){
                    c=1;
                    break;
                }
            }
        }
        if(c==1)
            break;
    }
    if(c==1)
        printf("POSSIBLE\n");
    else
        printf("IMPOSSIBLE\n");
    return 0;
}


#include<stdio.h>
int main()
{
int n,m,i;
  scanf("%d %d",&n,&m);
  int a[m],b[m],sw1[n+1],sw2[n+1],cc;

  for(i=0;i<n+1;++i)
  {
  sw1=0;
  sw2=0;
  }

  cc=0;

  for(i=0;i<m;++i)
  {
  scanf("%d %d",&a[i],&b[i]);
  if(a[i]==1) sw1[b[i]]++;
  if(b[i]==n) sw2[a[i]]++;
  }

  for(i=1;i<n+1;++i)
  {
  if(sw1[i]>0 && sw2[i]>0) cc++;
  }
  if(cc >0) printf("POSSIBLE");
  else printf("IMPOSSIBLE");

return 0;}


#include <stdio.h>
#include <string.h>

int main (void)
{
    int n,m,i,j,key=0,k=0,l=0;
    int a[200000],b[200000],maec[200000],atoc[200000];
    scanf("%d %d",&n,&m);
    for(i=0;i<m;i++)
    {
        scanf("%d %d",&a[i],&b[i]);
        if(a[i]==1)
        {
            maec[k]=b[i];
            k++;
        }else{
            if(b[i]==n)
            {
                atoc[l]=a[i];
                l++;
            }
        }
    }
    for(i=0;i<k;i++)
    {
        for(j=0;j<l;j++)
        {
            if(maec[i]==atoc[j])
            {
                key++;
                break;
            }
        }
        if(key==1)
        {
            break;
        }
    }
    if(key==1)
        puts("POSSIBLE");
    else
        puts("IMPOSSIBLE");
    return 0;
}


function main(input){
    var tmp;
    input = input.split("\n");
    tmp = input[0].split(" ");
    var N = Number(tmp[0]);
    var M = Number(tmp[1]);
    var p1 = new Array(input.length);
    var p2 = new Array(input.length);
    p1.fill(false);
    p2.fill(false);

    for(var i=0; i<input.length; i++){
        tmp = input[i].split(" ");
        if(Number(tmp[0])==1){
            p1[Number(tmp[1])] = true;
        }
        if(Number(tmp[1])==N){
            p2[Number(tmp[0])] = true;
        }
    }

    var index = -1;
    while(true){
        var index = p1.indexOf(true, index+1);
        if(index<0){
            console.log("IMPOSSIBLE");
            return;
        }else{
            if(p2[index]){
                console.log("POSSIBLE");
                return;
            }
        }
    }
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


function Main(input) {
  input = input.split("\n");
  var n = parseInt(input[0].split(" ")[0]);
  var m = parseInt(input[0].split(" ")[1]);
  x= new Array(Math.pow(10,5)*2).fill(0);
  var ans = "IMPOSSIBLE";
  for(i=0;i<m;i++){
    tmp=input[i+1].split(" ");
    if(tmp[0]==1){
      if(x[tmp[1]]==1){
        ans="POSSIBLE";
        break;
      }else{
      x[tmp[1]]++;
      }
    }
    if(tmp[1]==n){
      if(x[tmp[0]]==1){
        ans="POSSIBLE";
        break;
      }else{
        x[tmp[0]]++;
      }
    }
  }

  console.log('%s', ans);
}

// "実行する"ボタンを押した時に実行される関数 (デバッグ用)
function debug(){
  var input = document.getElementById("input").value;
  Main(input);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));


'use strict'

function main(input) {
  const parsed = parseInput(input);
  printPossibility(canReachGoal(parsed.ships, parsed.goal));
}

function parseInput(input) {
  const inputLines = input.split('\n');
  const goal = inputLines.shift().split(' ')[0];
  const ships = inputLines.map(line => line.split(' '));
  return {goal, ships};
}

function canReachGoal(ships, goal) {
  const reachableIslandMap = {};
  const oneStepIslands = [];
  ships.forEach(ship => {
    if (ship[0] === '1') {
      oneStepIslands.push(ship[1]);
    }
    if (ship[1] === goal) {
      reachableIslandMap[ship[0]] = true;
    }
  });
  return oneStepIslands.some(island => reachableIslandMap[island]);
}

function printPossibility(isPossible) {
  console.log(isPossible ? 'POSSIBLE' : 'IMPOSSIBLE');
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));


"use strict";
function Main(input) {
  var parseInputData = parseInput(input);
  resultValue(parseInputData);
}
var parseInput = (input) => {
  console.log(input);
  const lines = input.split(" ");
  //Aピザの価格
  const valuePizzaA = parseInt(lines[0], 10);
  //Bピザの価格
  const valuePizzaB = parseInt(lines[1], 10);
  //ABピザの価格
  const valuePizzaAB = parseInt(lines[2], 10);
  //必要なAピザの枚数
  const needQuantityPizzaA = parseInt(lines[3], 10);
  //必要なBピザの枚数
  const needQuantityPizzaB = parseInt(lines[4], 10);
  return { valuePizzaA: valuePizzaA, valuePizzaB: valuePizzaB, valuePizzaAB: valuePizzaAB, needQuantityPizzaA: needQuantityPizzaA, needQuantityPizzaB: needQuantityPizzaB};
}

//ピザの組み合わせの最安価を出力する
var resultValue = (parseInputData) => {
  parseInputData.valuePizzaAB > parseInputData.valuePizzaA + parseInputData.valuePizzaB ?
  console.log(parseInputData.valuePizzaA * parseInputData.needQuantityPizzaA + parseInputData.valuePizzaB * parseInputData.needQuantityPizzaB) :
  usePizzaABValue(parseInputData)
}

//ピザABを使用する場合の最安価を出力
var usePizzaABValue = (parseInputData) => {
  const needAmountPizzaAB= (parseInputData.needQuantityPizzaA > parseInputData.needQuantityPizzaB ?
    parseInputData.needQuantityPizzaB*2 : parseInputData.needQuantityPizzaA*2);
  console.log(parseInputData.needQuantityPizzaA > parseInputData.needQuantityPizzaB ?
    needAmountPizzaAB * parseInputData.valuePizzaAB + parseInputData.valuePizzaA * (parseInputData.needQuantityPizzaA - parseInputData.needQuantityPizzaB) :
    needAmountPizzaAB * parseInputData.valuePizzaAB + parseInputData.valuePizzaB * (parseInputData.needQuantityPizzaB + parseInputData.needQuantityPizzaA)
  )
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


"use strict";
function Main(input) {
  var parseInputData = parseInput(input);
  const result = isReachCheck(parseInputData.shipVariations, parseInputData.goalIsland);
  isPossibleCheck(result);

}
var parseInput = (input) => {
  input = input.split("\n");
  const lines = input[0].split(" ");
  //島のゴールを格納
  const goalIsland = parseInt(lines[0], 10);
  //船の数を格納
  const shipCount = parseInt(lines[1], 10);
  var shipVariations = parseShipVariations(shipCount, input);
  return { shipVariations: shipVariations, goalIsland: goalIsland };
}

//島に到着するかを確認する関数
var isReachCheck = (shipVariations, goalIsland) => {
  const ship1Variations = shipVariations.filter(function (shipVariation) {
    return shipVariation[0] === 1;
  });
  return (shipVariations.some((ship2Variation) => {
    return (ship1Variations.some((ship1Variation) => {
      if (ship1Variation[1] === ship2Variation[0] && ship2Variation[1] === goalIsland) {
        return true;
      };
    })
    )
  }));
}

//booleanを判別する関数
var isPossibleCheck = (isPossible) => {
  if (isPossible) {
    console.log('POSSIBLE');
  }
  else {
    console.log('IMPOSSIBLE');
  }
}

//船の特徴を配列に格納する関数
var parseShipVariations = (shipCount, lines) => {
  return lines.slice(1, shipCount + 1).map(line => line.split(" ").map(x => parseInt(x)));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


"use strict";
function Main(input) {
  var parseInputData = parseInput(input);
  const result = isReachCheck(parseInputData.shipVariations, parseInputData.goalIsland);
  isPossibleCheck(result);

}
var parseInput = (input) => {
  input = input.split("\n");
  const lines = input[0].split(" ");
  //島のゴールを格納
  const goalIsland = parseInt(lines[0], 10);
  //船の数を格納
  const shipCount = parseInt(lines[1], 10);
  var shipVariations = parseShipVariations(shipCount, input);
  return { shipVariations: shipVariations, goalIsland: goalIsland };
}

//島に到着するかを確認する関数
var isReachCheck = (shipVariations, goalIsland) => {
  const ship1Variations = shipVariations.filter(function (shipVariation) {
    return shipVariation[0] === 1;
  });
  return (shipVariations.some(function (ship2Variation) {
    return (ship1Variations.some(function (ship1Variation) {
      if (ship1Variation[1] === ship2Variation[0] && ship2Variation[1] === goalIsland) {
        return true;
      };
    })
    )
  }));
}

//booleanを判別する関数
var isPossibleCheck = (isPossible) => {
  if (isPossible) {
    console.log('POSSIBLE');
  }
  else {
    console.log('IMPOSSIBLE');
  }
}

//船の特徴を配列に格納する関数
var parseShipVariations = (shipCount, lines) => {
  return lines.slice(1, shipCount + 1).map(line => line.split(" ").map(x => parseInt(x)));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));


package main

import (
	"bufio"
	"container/heap"
	"fmt"
	"os"
	"sort"
	"strconv"
)

const (
	initialBufSize = 1e4
	maxBufSize     = 1e6 + 7
)

var buf []byte = make([]byte, maxBufSize)
var sc = bufio.NewScanner(os.Stdin)

func init() {
	sc.Split(bufio.ScanWords)
	sc.Buffer(buf, maxBufSize)
}

func main() {
	N, M := nextInt(), nextInt()
	routesA := make([]bool, N)
	routesB := make([]bool, N)
	for i := 0; i < M; i++ {
		a, b := nextInt()-1, nextInt()-1
		if a == 0 {
			routesA[b] = true
		}
		if b == N-1 {
			routesB[a] = true
		}
	}
	for i := 0; i < N; i++ {
		if routesA[i] && routesB[i] {
			fmt.Println("POSSIBLE")
			return
		}
	}
	fmt.Println("IMPOSSIBLE")
}

func nextLine() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func abs(a int) int {
	if a > 0 {
		return a
	} else {
		return -a
	}
}

func pow(p, q int) int {
	res := p
	if q == 0 {
		return 1
	}
	for i := 0; i < q-1; i++ {
		res *= p
	}
	return res
}

func MinOf(vars ...int) int {
	min := vars[0]
	for _, i := range vars {
		if min > i {
			min = i
		}
	}
	return min
}

func MaxOf(vars ...int) int {
	max := vars[0]
	for _, i := range vars {
		if max < i {
			max = i
		}
	}
	return max
}

func gcdof2numbers(a int, b int) int {
	if b == 0 {
		return a
	}
	return gcdof2numbers(b, a%b)
}

func lcmof2numbers(a int, b int) int {
	return a / gcdof2numbers(a, b) * b
}

// マイナスの場合は考慮していない
func fuctorial(a int) int {
	if a == 1 || a == 0 {
		return 1
	} else {
		return fuctorial(a-1) * a
	}
}

func NextPermutation(x sort.Interface) bool {
	n := x.Len() - 1
	if n < 1 {
		return false
	}
	j := n - 1
	for ; !x.Less(j, j+1); j-- {
		if j == 0 {
			return false
		}
	}
	l := n
	for !x.Less(j, l) {
		l--
	}
	x.Swap(j, l)
	for k, l := j+1, n; k < l; {
		x.Swap(k, l)
		k++
		l--
	}
	return true
}

// 素因数分解したmapを返す
func primeFuctorize(n int) map[int]int {
	pf := map[int]int{}
	for i := 2; i*i <= n; i++ {
		for n%i == 0 {
			pf[i]++
			n /= i
		}
	}
	if n != 1 {
		pf[n]++
	}
	return pf
}

// ここから拝借
// https://shoman.hatenablog.com/entry/2020/02/25/185456
// Stackは[]intのエイリアス
type Stack []int

// Push adds an element
func (s *Stack) Push(v int) {
	*s = append(*s, v)
}

// Pop removes the top element and return it
func (s *Stack) Pop() (int, error) {
	if s.Empty() {
		return 0, fmt.Errorf("stack is empty")
	}

	v := (*s)[len(*s)-1]
	*s = (*s)[:len(*s)-1]
	return v, nil
}

// Peek returns the top value
func (s *Stack) Peek() (int, error) {
	if s.Empty() {
		return 0, fmt.Errorf("stack is empty")
	}

	return (*s)[len(*s)-1], nil
}

// Size returns the length of stack
func (s *Stack) Size() int {
	return len(*s)
}

// Empty returns true when stack is empty
func (s *Stack) Empty() bool {
	return s.Size() == 0
}

// NewStack generates stack
func NewStack() *Stack {
	s := new(Stack)
	return s
}

// golangの公式サンプルより
// https://xn--go-hh0g6u.com/pkg/container/heap/#example__intHeap
// IntHeap は，整数の最小ヒープです。
type IH []int

func (h IH) Len() int           { return len(h) }
func (h IH) Less(i, j int) bool { return h[i] < h[j] }
func (h IH) Swap(i, j int)      { h[i], h[j] = h[j], h[i] }

func (h *IH) Push(x interface{}) {
	// Push と Pop はポインタレシーバを使っています。
	// なぜなら，スライスの中身だけでなく，スライスの長さも変更するからです。
	*h = append(*h, x.(int))
}

func (h *IH) Pop() interface{} {
	old := *h
	n := len(old)
	x := old[n-1]
	*h = old[0 : n-1]
	return x
}

// golangの公式サンプルより
// https://xn--go-hh0g6u.com/pkg/container/heap/#example__priorityQueue

// Item は，優先キューで管理する項目です。
type Item struct {
	value    string // 値。任意です。
	priority int    // キューにおける優先度
	// index は heap.Interface メソッドで更新されます。
	index int // ヒープにおけるインデックス
}

// PriorityQueue は heap.Interface を実装し，Item のリストを保持します。
type PriorityQueue []*Item

func (pq PriorityQueue) Len() int { return len(pq) }

func (pq PriorityQueue) Less(i, j int) bool {
	// Pop が最小ではなく最大の優先度を持つ項目を返して欲しいので，ここでは > を使っています。
	return pq[i].priority > pq[j].priority
}

func (pq PriorityQueue) Swap(i, j int) {
	pq[i], pq[j] = pq[j], pq[i]
	pq[i].index = i
	pq[j].index = j
}

func (pq *PriorityQueue) Push(x interface{}) {
	n := len(*pq)
	item := x.(*Item)
	item.index = n
	*pq = append(*pq, item)
}

func (pq *PriorityQueue) Pop() interface{} {
	old := *pq
	n := len(old)
	item := old[n-1]
	old[n-1] = nil  // メモリリークを避ける
	item.index = -1 // 安全のため
	*pq = old[0 : n-1]
	return item
}

// update はキューの Item の優先度と値を更新します。
func (pq *PriorityQueue) update(item *Item, value string, priority int) {
	item.value = value
	item.priority = priority
	heap.Fix(pq, item.index)
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

var sc, wr = bufio.NewScanner(os.Stdin), bufio.NewWriter(os.Stdout)

func scanString() string   { sc.Scan(); return sc.Text() }
func scanRunes() []rune    { return []rune(scanString()) }
func scanInt() int         { a, _ := strconv.Atoi(scanString()); return a }
func scanInt64() int64     { a, _ := strconv.ParseInt(scanString(), 10, 64); return a }
func scanFloat64() float64 { a, _ := strconv.ParseFloat(scanString(), 64); return a }

func scanInts(n int) []int {
	res := make([]int, n)
	for i := 0; i < n; i++ {
		res[i] = scanInt()
	}
	return res
}

func debug(a ...interface{}) { fmt.Fprintln(os.Stderr, a...) }

func abs(a int) int {
	if a < 0 {
		return -a
	}
	return a
}
func min(a, b int) int {
	if a < b {
		return a
	}
	return b
}
func max(a, b int) int {
	if a > b {
		return a
	}
	return b
}

//•*¨*•.¸¸♪main•*¨*•.¸¸♪(　-ω-)ノ　(　・ω・)
func main() {
	defer wr.Flush()
	sc.Split(bufio.ScanWords)
	sc.Buffer(make([]byte, 10000), 1001001)

	n, m := scanInt(), scanInt()
	c, d := make([]bool, n), make([]bool, n)
	for i := 0; i < m; i++ {
		a, b := scanInt()-1, scanInt()-1
		if a == 0 {
			c[b] = true
		}
		if b == n-1 {
			d[a] = true
		}
	}

	for i := 0; i < n; i++ {
		if c[i] && d[i] {
			fmt.Fprintln(wr, "POSSIBLE")
			return
		}
	}
	fmt.Fprintln(wr, "IMPOSSIBLE")
}


package main

import (
	"bufio"
	"fmt"
	"math"
	"os"
	"strconv"
)

//Util
func nextStr() string {
	sc.Scan()
	return sc.Text()
}

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

func maxInt(a, b int) int {
	if a > b {
		return a
	} else {
		return b
	}
}

func minInt(a, b int) int {
	if a > b {
		return b
	} else {
		return a
	}
}

func absInt(a int) int {
	if a >= 0 {
		return a
	} else {
		return -a
	}
}

func absFloat64(a float64) float64 {
	if a >= 0 {
		return a
	} else {
		return -a
	}
}

func maxFloat64(a, b float64) float64 {
	if a > b {
		return a
	} else {
		return b
	}
}

func minFloat64(a, b float64) float64 {
	if a > b {
		return b
	} else {
		return a
	}
}

func str2Int(s string) int {
	n, _ := strconv.Atoi(s)
	return n
}

func reverse(s string) string {
	runes := []rune(s)
	for i, j := 0, len(runes)-1; i < j; i, j = i+1, j-1 {
		runes[i], runes[j] = runes[j], runes[i]
	}
	return string(runes)
}

func powInt(p, q int) int {
	return int(math.Pow(float64(p), float64(q)))
}

func isPrime(x int) bool {
	if x == 1 {
		return false
	}
	if x == 2 {
		return true
	}
	if x%2 == 0 {
		return false
	}

	b := true
	rootx := int(math.Sqrt(float64(x)))
	i := 3
	for i <= rootx {
		if x%i == 0 {
			b = false
			break
		}
		i += 2
	}
	return b
}

func PrimeFactors(n int) (pfs []int) {
	// Get the number of 2s that divide n
	for n%2 == 0 {
		pfs = append(pfs, 2)
		n = n / 2
	}

	// n must be odd at this point. so we can skip one element
	// (note i = i + 2)
	for i := 3; i*i <= n; i = i + 2 {
		// while i divides n, append i and divide n
		for n%i == 0 {
			pfs = append(pfs, i)
			n = n / i
		}
	}

	// This condition is to handle the case when n is a prime number
	// greater than 2
	if n > 2 {
		pfs = append(pfs, n)
	}

	return
}

func PrimeFactorsMap(n int) map[int]int {
	pfs := map[int]int{}
	// Get the number of 2s that divide n
	for n%2 == 0 {
		if _, ok := pfs[2]; ok {
			pfs[2]++
		} else {
			pfs[2] = 1
		}
		//pfs = append(pfs, 2)
		n = n / 2
	}

	// n must be odd at this point. so we can skip one element
	// (note i = i + 2)
	for i := 3; i*i <= n; i = i + 2 {
		// while i divides n, append i and divide n
		for n%i == 0 {
			if _, ok := pfs[i]; ok {
				pfs[i]++
			} else {
				pfs[i] = 1
			}
			n = n / i
		}
	}

	// This condition is to handle the case when n is a prime number
	// greater than 2
	if n > 2 {
		if _, ok := pfs[n]; ok {
			pfs[n]++
		} else {
			pfs[n] = 1
		}
	}

	return pfs
}

func sumInts(x []int) int {

	total := 0
	for _, v := range x {
		total += v
	}

	return total
}

//Main
const (
	initialBufSize = 10000
	maxBufSize     = 1000000
	mod            = 1e9 + 7
)

var (
	sc *bufio.Scanner = func() *bufio.Scanner {
		sc := bufio.NewScanner(os.Stdin)
		buf := make([]byte, initialBufSize)
		sc.Buffer(buf, maxBufSize)
		return sc
	}()
)

// type Ship struct {
// 	src, dest int
// }

func main() {
	sc.Split(bufio.ScanWords)

	N, M := nextInt(), nextInt()
	//S := make([]Ship, M)
	A, B := make([]int, N), make([]int, N)

	for i := 0; i < M; i++ {
		a, b := nextInt(), nextInt()
		src := minInt(a, b)
		dest := maxInt(a, b)
		if src == 1 {
			A[dest-1] = 1
		}
		if dest == N {
			B[src-1] = 1
		}
	}

	for i := 1; i < N-1; i++ {
		if A[i] == 1 && B[i] == 1 {
			fmt.Println("POSSIBLE")
			return
		}
	}

	fmt.Println("IMPOSSIBLE")
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"sort"
	"strconv"
)

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

var sc = bufio.NewScanner(os.Stdin)

func main() {
	// Code for C - Cat Snuke and a Voyage
	var N, M int
	fmt.Scanf("%d %d", &N, &M)

	sc.Split(bufio.ScanWords)
	var a, b int
	c := make([]int, 0)
	d := make([]int, 0)

	for i := 0; i < M; i++ {
		a = nextInt()
		b = nextInt()
		if a == 1 {
			c = append(c, b)
		} else if b == N {
			d = append(d, a)
		}
	}

	sort.Sort(sort.IntSlice(c))
	sort.Sort(sort.IntSlice(d))

	var flag int = 0
	for _, v1 := range c {
		for _, v2 := range d {
			if v1 == v2 {
				flag = 1
				break
			} else if v1 < v2 {
				break
			}
		}
		if flag == 1 {
			break
		}
	}

	if flag == 1 {
		fmt.Println("POSSIBLE")
	} else {
		fmt.Println("IMPOSSIBLE")
	}
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

var sc = bufio.NewScanner(os.Stdin)

func main() {
	// Code for C - Cat Snuke and a Voyage
	var N, M int
	fmt.Scanf("%d %d", &N, &M)

	sc.Split(bufio.ScanWords)
	var a, b int
	c := make([]int, 0)
	d := make([]int, 0)

	for i := 0; i < M; i++ {
		a = nextInt()
		b = nextInt()
		if a == 1 {
			c = append(c, b)
		} else if b == N {
			d = append(d, a)
		}
	}

	var flag int = 0
	for _, v1 := range c {
		for _, v2 := range d {
			if v1 == v2 {
				flag = 1
				break
			}
		}
		if flag == 1 {
			break
		}
	}

	if flag == 1 {
		fmt.Println("POSSIBLE")
	} else {
		fmt.Println("IMPOSSIBLE")
	}
}


package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func nextInt() int {
	sc.Scan()
	i, e := strconv.Atoi(sc.Text())
	if e != nil {
		panic(e)
	}
	return i
}

var sc = bufio.NewScanner(os.Stdin)

func main() {
	// Code for C - Cat Snuke and a Voyage
	var N, M int
	fmt.Scanf("%d %d", &N, &M)

	sc.Split(bufio.ScanWords)
	a := make([]int, M)
	b := make([]int, M)
	c := make([]int, 0)
	d := make([]int, 0)

	for i := 0; i < M; i++ {
		a[i] = nextInt()
		b[i] = nextInt()
		if a[i] == 1 {
			c = append(c, b[i])
		}
		if b[i] == N {
			d = append(d, a[i])
		}
	}

	var flag int = 0
	for _, v1 := range c {
		for _, v2 := range d {
			if v1 == v2 {
				flag = 1
				break
			}
		}
		if flag == 1 {
			break
		}
	}

	if flag == 1 {
		fmt.Println("POSSIBLE")
	} else {
		fmt.Println("IMPOSSIBLE")
	}
}


n,m=gets.split.map(&:to_i)
all=[]
check_first=[]
check_last=[]

m.times.each do
v=gets.split.map(&:to_i)
if v[0]==1
    check_first<<v[1]
elsif v[1]==n
    check_last<<v[0]
end

end
#p check_last
#p check_first
if (check_first & check_last)[0]!=nil
   # p check_first & check_last
    puts "POSSIBLE"
else
puts "IMPOSSIBLE"
end


N,M=gets.split.map(&:to_i)
a1=[]
an=[]
M.times{
    a,b=gets.split.map(&:to_i)
    if a==1
        a1 << b
    end
    if a==N
        an << b
    end
    if b==1
        a1 << a
    end
    if b==N
        an << a
    end
}
if (a1 & an).empty?
    puts "IMPOSSIBLE"
else
    puts "POSSIBLE"
end


n,m = gets.strip.split.map(&:to_i)
rec1 = []
recn = []
m.times do
  a,b = gets.strip.split.map(&:to_i)
  if a==1
    rec1 << b
  elsif b == 1
    rec1 << a
  elsif a==n
    recn << b
  elsif b==n
    recn << a
  end
end
recnew = rec1+recn
if recnew.size == recnew.uniq.size
  puts "IMPOSSIBLE"
else
  puts "POSSIBLE"
end


n,m=gets.split.map(&:to_i)
start=[]
goal=[]
all=[]
m.times.each do
    v=gets.split.map(&:to_i)
    if v[1]==n
        goal<<v[0]
    elsif v[0]==1
        start<<v[1]
    end
    all<<v
end

set=start&goal

if set[0]!=nil
    puts "POSSIBLE"
else
    puts "IMPOSIBLE"
end


n,m=gets.split.map(&:to_i)
start=[]
goal=[]
all=[]
m.times.each do
    v=gets.split.map(&:to_i)
    if v[1]==n
        goal<<v[0]
    elsif v[0]==1
        start<<v[1]
    end
    all<<v
end

set=start&goal
if set.length>0
    puts "POSSIBLE"
else
    puts "IMPOSIBLE"
end


n,m=gets.split.map(&:to_i)
start=[-10]
goal=[]
all=[]
m.times.each do
    v=gets.split.map(&:to_i)
    if v[1]==n
        goal<<v[0]
    elsif v[0]==1
        start<<v[1]
    end
    all<<v
end

goal.sort!
start.sort!
for i in 0..goal.length-1
    if start.bsearch{|j|j>=goal[i]}==nil || start.bsearch{|j|j<=goal[i]}==nil
        next
    else
    v=start.bsearch{|j|j>=goal[i]}-start.bsearch{|j|j<=goal[i]}
    end

    if v!=nil

        puts "POSSIBLE"
        exit
    end
end
puts "IMPOSSIBLE"