codeparrot/codecomplex huggingface dataset:
// Problem: 35_C. Fire Again
// Time complexity: cubic
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.LinkedList;
import java.util.Queue;
import java.util.StringTokenizer;
//import java.util.Scanner;

public class Codes {

	public static void main(String[] args) throws IOException {
		InputReader input = new InputReader(new FileReader(("input.txt")));
		int n = input.nextInt();
		int m = input.nextInt();
		int k = input.nextInt();
		boolean[][] visited = new boolean[n][m];
		Queue<Point> bfs = new LinkedList<Point>();
		for (int i = 0; i < k; i++) {
			int x = input.nextInt();
			int y = input.nextInt();
			visited[x - 1][y - 1] = true;
			bfs.add(new Point(x - 1, y - 1));
		}
		Point last = bfs.peek();
		while(!bfs.isEmpty()) {
			Point current = bfs.poll();
			int curX = current.x;
			int curY = current.y;
			//the upper tree
			if(curX - 1 >= 0) {
				if(!visited[curX - 1][curY]) {
					bfs.add(new Point(curX - 1,curY));
					visited[curX - 1][curY] = true;
				}
			}
			//the tree to the right
			if(curY + 1 < m) {
				if(!visited[curX][curY + 1]) {
					bfs.add(new Point(curX ,curY + 1));
					visited[curX][curY + 1] = true;
				}
			}
			//the lower tree
			if(curX + 1 < n) {
				if(!visited[curX + 1][curY]) {
					bfs.add(new Point(curX + 1,curY));
					visited[curX + 1][curY] = true;
				}
			}
			//the point to the left
			if(curY - 1 >= 0) {
				if(!visited[curX][curY - 1]) {
					bfs.add(new Point(curX ,curY - 1));
					visited[curX][curY - 1] = true;
				}
			}
			if(bfs.peek()!= null)
			last = bfs.peek();
		}
		PrintWriter out = new PrintWriter(new File("output.txt"));
		out.println((last.x + 1) + " " + (last.y + 1));
		out.close();
		//System.out.println((last.x + 1) + " " + (last.y + 1));
	}

	static class Point {
		int x;
		int y;

		public Point(int x2, int y2) {
			x = x2;
			y = y2;
			
		}
	}

	/**
	 * This reader class is NOT Mine.
	 **/
	static class InputReader {
		private BufferedReader reader;
		private StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream));
			tokenizer = null;
		}

		public InputReader(FileReader stream) {
			reader = new BufferedReader(stream);
			tokenizer = null;
		}

		public String nextLine() {
			try {
				return reader.readLine();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
				return null;
			}
		}

		public String next() {
			while (tokenizer == null || !tokenizer.hasMoreTokens()) {
				try {
					tokenizer = new StringTokenizer(reader.readLine());
				} catch (IOException e) {
					throw new RuntimeException(e);
				}
			}
			return tokenizer.nextToken();
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}
	}

}
// Problem: 35_C. Fire Again
// Time complexity: cubic
import java.awt.*;
import java.io.*;
import java.util.*;
public class Abc {
    public static void main(String[] args) throws IOException {
//        FastReader sc = new FastReader();
        Scanner sc=new Scanner(new FileReader("input.txt"));
        PrintWriter out=new PrintWriter(new File("output.txt"));
        int n=sc.nextInt(),m=sc.nextInt(),k=sc.nextInt();
        boolean vis[][]=new boolean[n][m];
        LinkedList<Integer> q=new LinkedList<>();
        for (int i=0;i<k;i++){
            int x=sc.nextInt()-1,y=sc.nextInt()-1;
            vis[x][y]=true;
            q.add(x);q.add(y);
        }
        int lastx=-1,lasty=-1;
        int dirX[]={1,-1,0,0},dirY[]={0,0,1,-1};
        while (!q.isEmpty()){
            int x=q.removeFirst();
            int y=q.removeFirst();
            lastx=x;lasty=y;
            for (int i=0;i<4;i++){
                int newx=x+dirX[i],newy=y+dirY[i];
                if (newx>=0 && newx<n && newy>=0 && newy<m && !vis[newx][newy]){
                    vis[newx][newy]=true;
                    q.add(newx);q.add(newy);
                }
            }
        }
        out.println((lastx+1)+" "+(lasty+1));
        out.close();
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
}
// Problem: 35_C. Fire Again
// Time complexity: cubic

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;

public class Main {

    static class Point {
        int x;
        int y;

        Point(int a, int b) {
            x = a;
            y = b;
        }

        @Override
        public String toString() {
            return "Point{" +
                    "x=" + x +
                    ", y=" + y +
                    '}';
        }
    }

    public static void main(String[] args) throws IOException {
        File f = new File("input.txt");
        Scanner sc = new Scanner(f);
        BufferedWriter bw = new BufferedWriter(new FileWriter(new File("output.txt")));
        int n = sc.nextInt();
        int m = sc.nextInt();
        boolean[][] board = new boolean[n][m];
        int count = sc.nextInt();
        Point[] burningTrees = new Point[count];
        for (int i=0; i<count; i++) {
            burningTrees[i] = new Point(sc.nextInt() - 1,sc.nextInt() - 1);
        }
        Point last = findLastPoint(board,burningTrees);
        bw.append((last.x + 1) + " " + (last.y + 1) + "\n");
        bw.flush();
        bw.close();
        sc.close();
    }



    public static Point findLastPoint(boolean[][] board,  Point[] burningTree){
        Queue<Point> queue = new LinkedList<Point>();
        for(int i = 0; i <burningTree.length; i++ ) {
            queue.add(burningTree[i]);
            board[burningTree[i].x][burningTree[i].y] = true;
        }
        Point lastPoint = new Point(-1,-1);
        while (!queue.isEmpty()) {
            Point p = queue.poll();
            lastPoint = p;
            ArrayList<Point> neighbours = getNeighbours(p,board);
            for(int i = 0; i <neighbours.size(); i++ ) {
                queue.add(neighbours.get(i));
                board[neighbours.get(i).x][neighbours.get(i).y] = true;
            }
        }
        return lastPoint;
    }

    public static ArrayList<Point> getNeighbours(Point p, boolean[][] board){
        ArrayList<Point> neighbours = new ArrayList<>();
        for(int i = -1; i <=1; i++ ){
            for(int j = -1; j <= 1; j++ ){
                if(Math.abs(i) != Math.abs(j)) {
                    int x = p.x + i;
                    int y = p.y + j;
                    if (x >= 0 && x < board.length && y >= 0 && y < board[0].length) {
                        if (board[x][y] == false) {
                            neighbours.add(new Point(x,y));
                        }
                    }
                }
            }
        }
        return neighbours;
    }
}
// Problem: 35_C. Fire Again
// Time complexity: cubic
import java.io.*;
import java.util.*;
import java.math.*;

public class C implements Runnable {
	BufferedReader in;
	PrintWriter out;
	StringTokenizer st;
	Random rnd;
	
	short[] qx, qy;
	boolean[][] used;
	final int[] dx = {1, -1, 0, 0};
	final int[] dy = {0, 0, 1, -1};
	
	void solve() throws IOException {
		int n = nextInt(), m = nextInt();
		
		qx = new short[n * m];
		qy = new short[n * m];
		used = new boolean[n][m];
		
		int k = nextInt(), qs = 0, qt = 0;
		
		for(int i = 0; i < k; i++) {
			int x = nextInt() - 1, y = nextInt() - 1;
			used[x][y] = true;
			qx[qt] = (short) x;
			qy[qt] = (short) y;
			++qt;
		}
		
		int rx = 0, ry = 0;
		
		while(qs < qt) {
			int cx = qx[qs], cy = qy[qs];
			++qs;
			
			rx = cx;
			ry = cy;
			
			for(int z = 0; z < 4; z++) {
				int nx = cx + dx[z], ny = cy + dy[z];
				
				if(nx >= 0 && ny >= 0 && nx < n && ny < m && !used[nx][ny]) {
					used[nx][ny] = true;
					qx[qt] = (short) nx;
					qy[qt] = (short) ny;
					++qt;
				}
			}
		}
		
		out.println((rx + 1) + " " + (ry + 1));
	}

	public static void main(String[] args) {
		final boolean oldChecker = false;
		
		if(oldChecker) {
			new Thread(null, new C(), "yarrr", 1 << 24).start();
		} else {
			new C().run();
		}
	}

	public void run() {
		try {
			try {
				in = new BufferedReader(new FileReader("input.txt"));
				out = new PrintWriter(new FileWriter("output.txt"));
			} catch (FileNotFoundException e) {
				in = new BufferedReader(new InputStreamReader(System.in));
				out = new PrintWriter(System.out);
			}

			rnd = new Random();

			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(42);
		}
	}

	String nextToken() throws IOException {
		while (st == null || !st.hasMoreTokens()) {
			String line = in.readLine();

			if (line == null) {
				return null;
			}

			st = new StringTokenizer(line);
		}

		return st.nextToken();
	}

	int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}
}
// Problem: 35_C. Fire Again
// Time complexity: cubic
import java.io.*;
import java.util.*;

public class MainF {
    public static void main(String[]args) throws IOException{
        BufferedReader br = new BufferedReader(new FileReader(new File("input.txt")));
        BufferedWriter bw = new BufferedWriter(new FileWriter(new File("output.txt")));
        String S = br.readLine();
        String[]J = S.split(" ");
        int N = Integer.parseInt(J[0]);
        int M = Integer.parseInt(J[1]);

        int K = Integer.parseInt(br.readLine());
        int[]x = new int[K];
        int[]y = new int[K];
        S = br.readLine();
        J = S.split(" ");       
        for(int i = 0; i<2*K; i = i + 2){
            x[i/2] = Integer.parseInt(J[i]);
            y[i/2] = Integer.parseInt(J[i+1]);
        }
        
        int ans = -1;
        int ansX = -1;
        int ansY = -1;
        
        for (int i = 1; i<=N; i++){
            for (int j = 1; j<=M; j++){
                int W = M + N;
                for (int k = 0; k<K; k++){
                    W = Math.min(W, Math.abs(i-x[k]) + Math.abs(j-y[k]));
                }
                if (W < ans)continue;
                ans = W;
                ansX = i;
                ansY = j;               
            }
        }
        bw.write(Integer.toString(ansX)+" "+Integer.toString(ansY));
        br.close();
        bw.close();     
    }
}
// Problem: 35_C. Fire Again
// Time complexity: cubic
import java.io.*;
import java.util.*;

public class C35C_BFS_Fire {
    public static boolean[][] burning;
    public static LinkedList<int[]> LitTrees; //which is best to use
    public static int N, M;
    public static int[] lastTree;
    public static void main(String[] args) throws IOException {
        // InputStreamReader stream = new InputStreamReader(System.in);
        // BufferedReader input = new BufferedReader(stream);

        BufferedReader input = new BufferedReader(new FileReader("input.txt"));
		PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("output.txt")));

        StringTokenizer dataR = new StringTokenizer(input.readLine());
        N = Integer.parseInt(dataR.nextToken());
        M = Integer.parseInt(dataR.nextToken());
        burning = new boolean[N+1][M+1];

        StringTokenizer dataR1 = new StringTokenizer(input.readLine());
        int K = Integer.parseInt(dataR1.nextToken());

        StringTokenizer dataR2 = new StringTokenizer(input.readLine());
        LitTrees = new LinkedList<int[]>();
        for (int j = 0; j < K; j++){
            int x = Integer.parseInt(dataR2.nextToken());
            int y = Integer.parseInt(dataR2.nextToken());
            int[] coord = {x, y};
            LitTrees.add(coord);
            burning[x][y] = true;
        }

        // while(ExistsAliveTree()){
        //     spread();
        // }

        spread();

        // System.out.println(LitTrees.getLast()[0] + " " + LitTrees.getLast()[1]);
        out.println(lastTree[0] + " " + lastTree[1]);
        out.close();

    }

    public static void spread(){
        while(!LitTrees.isEmpty()){
            int[] studying = LitTrees.removeFirst(); //is iterator faster
            int[] studying1 = {studying[0]-1, studying[1]};
            int[] studying2 = {studying[0], studying[1]-1};
            int[] studying3 = {studying[0], studying[1]+1};
            int[] studying4 = {studying[0]+1, studying[1]};
            if (studying1[0] >= 1 && !burning[studying1[0]][studying1[1]]){
                LitTrees.add(studying1);
                burning[studying1[0]][studying1[1]] = true;
            }
            if (studying2[1] >= 1 && !burning[studying2[0]][studying2[1]]){
                LitTrees.add(studying2);
                burning[studying2[0]][studying2[1]] = true;
            }
            if (studying3[1] < M+1 && !burning[studying3[0]][studying3[1]]){
                LitTrees.add(studying3);
                burning[studying3[0]][studying3[1]] = true;
            }
            if (studying4[0] < N+1 && !burning[studying4[0]][studying4[1]]){
                LitTrees.add(studying4);
                burning[studying4[0]][studying4[1]] = true;
            }
            lastTree = studying; 
        }        
    }
    

    public static boolean ExistsAliveTree() {
        if (LitTrees.size() == N*M){
            return false;
        } else{
            return true;
        }
    }
}
// Problem: 35_C. Fire Again
// Time complexity: cubic
//package round35;

import java.io.File;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;

public class C {
	Scanner in;
	PrintWriter out;
//	String INPUT = "3 3 1 1 1";
	String INPUT = "";
	
	void solve()
	{
		int n = ni();
		int m = ni();
		int k = ni();
		int[] x = new int[k];
		int[] y = new int[k];
		for(int i = 0;i < k;i++){
			x[i] = ni() - 1;
			y[i] = ni() - 1;
		}
		int max = -1;
		int maxi = -1;
		int maxj = -1;
		for(int i = 0;i < n;i++){
			for(int j = 0;j < m;j++){
				int min = Integer.MAX_VALUE;
				for(int l = 0;l < k;l++){
					min = Math.min(min, Math.abs(x[l] - i) + Math.abs(y[l] - j));
				}
				if(min > max){
					max = min;
					maxi = i;
					maxj = j;
				}
			}
		}
		
		out.println((maxi+1) + " " + (maxj+1));
	}
	
	void run() throws Exception
	{
		in = INPUT.isEmpty() ? new Scanner(new File("input.txt")) : new Scanner(INPUT);
		out = INPUT.isEmpty() ? new PrintWriter("output.txt") : new PrintWriter(System.out);

		solve();
		out.flush();
	}
	
	
	public static void main(String[] args) throws Exception
	{
		new C().run();
	}
	
	int ni() { return Integer.parseInt(in.next()); }
	void tr(Object... o) { if(INPUT.length() != 0)System.out.println(o.length > 1 || o[0].getClass().isArray() ? Arrays.deepToString(o) : o[0]); }
	static String join(int[] a, int d){StringBuilder sb = new StringBuilder();for(int v : a){sb.append(v + d + " ");}return sb.toString();}
}
// Problem: 35_C. Fire Again
// Time complexity: cubic

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


public class c {

	static boolean used[][];
	static int n;
	static int m;
	static int a[][];
	
	
	public static void main(String args[])throws Exception{
		Scanner in =new Scanner(new File("input.txt"));//System.in);//
		PrintWriter out=new PrintWriter(new File("output.txt"));//System.out);//
		n = in.nextInt();
		m = in.nextInt();
		int k = in.nextInt();
		//a=new int[n+1][m+1];
		/*for (int i = 1; i<=n; i++)
			for (int j = 1; j<=m; j++)
				a[i][j] = 40001;
		*/
		int x[]=new int[k];
		int y[]=new int[k];
		for (int i = 0; i<k; i++){
			x[i] = in.nextInt();
			y[i] = in.nextInt();
		}
		
		int max = 0;
		int xx = 1; int yy= 1;
		for (int i = 1; i<=n; i++)
			for (int j = 1; j<=m; j++){
				int count = Integer.MAX_VALUE;
				for (int l =0; l<k; l++)
					count = Math.min(Math.abs(i - x[l]) + Math.abs(j - y[l]), count);
		
				if (max < count){
					max = count;
					xx = i; yy = j;
				}
			}
		out.println(xx + " " + yy);
		out.close();
	}
}
// Problem: 35_C. Fire Again
// Time complexity: cubic
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws FileNotFoundException {
		Scanner sc = new Scanner(new File("input.txt"));
		PrintWriter out = new PrintWriter(new File("output.txt"));
		int n = sc.nextInt();
		int m = sc.nextInt();
		int k = sc.nextInt();
		ArrayList<ArrayList<Integer>> fire = new ArrayList<ArrayList<Integer>>();
		while (k-- != 0) {
			ArrayList<Integer> t = new ArrayList<Integer>();
			t.add(sc.nextInt());
			t.add(sc.nextInt());
			fire.add(t);
		}
		
		int maxI = 0, maxJ = 0, maxManhatten = -1;
		for(int i = 1; i <= n; i++)
			for(int j = 1; j <= m; j++){
				int curManhatten = Integer.MAX_VALUE;
				for(int u = 0; u < fire.size(); u++)
					curManhatten = Math.min(curManhatten, manhatten(i, j, fire.get(u).get(0), fire.get(u).get(1)));
				
				if(curManhatten > maxManhatten){
					maxManhatten = curManhatten;
					maxI = i;
					maxJ = j;
				}
			}
		
		out.print(maxI + " " + maxJ);
		out.flush();
		out.close();
	}

	private static int manhatten(int i, int j, Integer a, Integer b) {
		return Math.abs(i - a) + Math.abs(j - b);
	}
}
// Problem: 35_C. Fire Again
// Time complexity: cubic
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Queue;
import java.util.StringTokenizer;

public class A {

	static int dx[] = { 1, -1, 0, 0 };
	static int dy[] = { 0, 0, 1, -1 };

	public static void main(String args[]) throws Exception {
		Scanner sc = new Scanner("input.txt");
		PrintWriter out = new PrintWriter("output.txt");
		int n = sc.nextInt(), m = sc.nextInt();
		int[][] grid = new int[n][m];
		for (int[] i : grid)
			Arrays.fill(i, -1);
		Queue<Pair> q = new LinkedList<>();
		int k = sc.nextInt();
		for (int i = 0; i < k; i++) {
			int x = sc.nextInt() - 1, y = sc.nextInt() - 1;
			grid[x][y] = 0;
			q.add(new Pair(x, y));
		}
		Pair p = new Pair(-1, -1);
		while (!q.isEmpty()) {
			p = q.poll();
			for (int i = 0; i < dx.length; i++) {
				int tx = p.x + dx[i], ty = p.y + dy[i];
				if (tx >= 0 && tx < n && ty >= 0 && ty < m && grid[tx][ty] == -1) {
					grid[tx][ty] = grid[p.x][p.y] + 1;
					q.add(new Pair(tx, ty));
				}
			}
		}
		out.println(p);
		out.flush();
		out.close();
	}

	static class Pair {
		int x, y;

		public Pair(int a, int b) {
			x = a;
			y = b;
		}

		public String toString() {
			return x + 1 + " " + (y + 1);
		}
	}

	static class Scanner {
		StringTokenizer st;
		BufferedReader br;

		public Scanner(InputStream s) {
			br = new BufferedReader(new InputStreamReader(s));
		}

		public Scanner(String r) throws FileNotFoundException {
			br = new BufferedReader(new FileReader(r));
		}

		public String next() throws IOException {
			while (st == null || !st.hasMoreTokens())
				st = new StringTokenizer(br.readLine());
			return st.nextToken();
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(next());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(next());
		}

		public String nextLine() throws IOException {
			return br.readLine();
		}

		public boolean ready() throws IOException {
			return br.ready();
		}
	}
}
// Problem: 35_C. Fire Again
// Time complexity: cubic
import java.io.*;
import java.util.List;
import java.util.LinkedList;
import java.util.StringTokenizer;

public class Problem {
	
	public static Pair solve(Forest f, List<Pair> queue){
		Pair current = null, next = null;
		int index = 0;
		while(queue.size() > 0){
			current = queue.remove(0);
			index = f.desk[current.x][current.y];
				if(current.x>0){
					next = new Pair(current.x-1,current.y);
					if(f.desk[next.x][next.y]==0){
						f.desk[next.x][next.y] = index+1;
						queue.add(next);
					}
				}
				if(current.x<f.N-1){
					next = new Pair(current.x+1,current.y);
					if(f.desk[next.x][next.y]==0){
						f.desk[next.x][next.y] = index+1;
						queue.add(next);
					}
				}
				if(current.y>0){
					next = new Pair(current.x,current.y-1);
					if(f.desk[next.x][next.y]==0){
						f.desk[next.x][next.y] = index+1;
						queue.add(next);
					}
				}
				if(current.y<f.M-1){
					next = new Pair(current.x,current.y+1);
					if(f.desk[next.x][next.y]==0){
						f.desk[next.x][next.y] = index+1;
						queue.add(next);
					}
				}
		}
		return f.findMax();
	}

	public static void main(String[] args){
		String buffer = null;
		StringTokenizer st = null;
		Forest f = null;
		List<Pair> pairs = new LinkedList<Pair>();
		Integer N,M,K,x,y;
		try {
			BufferedReader in = new BufferedReader(
							new FileReader("input.txt")
							);
			FileWriter out = new FileWriter("output.txt");
			buffer = in.readLine();
			st = new StringTokenizer(buffer);
			N = new Integer(st.nextToken());
			M = new Integer(st.nextToken());
			f = new Forest(N,M);
			buffer = in.readLine();
			st = new StringTokenizer(buffer);
			K = new Integer(st.nextToken());
			buffer = in.readLine();
			st = new StringTokenizer(buffer);
			for(int i = 0; i<K; i++){
				x = new Integer(st.nextToken());
				y = new Integer(st.nextToken());
				f.desk[x-1][y-1] = 1;
				pairs.add(new Pair(x-1,y-1));
			}
			Pair res = solve(f,pairs);
			
			out.write(res.toString());
			out.flush();
		} catch (Exception e) {
		}
	}
}

class Pair {
	public Pair(int i, int j){
		x = i;
		y = j;
	}
	public String toString(){
		return (x+1) + " " + (y+1);
	}
	public int x;
	public int y;
}

class Forest {
	public Forest(int n, int m){
		N = n;
		M = m;
		desk = new int[N][M];
	}

	public Pair findMax(){
		Pair max = new Pair(0,0);
		for(int i = 0; i<N; i++){
			for(int j = 0; j<M; j++){
				if(desk[i][j]>desk[max.x][max.y]){
					max.x = i;
					max.y = j;
				}
			}
		}
		return max;
	}	

	public int N;
	public int M;
	public int[][] desk;
}