/************************************************
Grundlegende Algorithmen mit Java,
http://algorithmen-und-problemloesungen.de/
Copyright @2007-2008 by Doina Logofatu
************************************************/

import java.io.*;
import java.util.*;

public class P10Ball {
  private static final String FileInputName = "ball.in";
  private static final String FileOutputName = "ball.out";

  private static boolean onTheBorder(int k, int m, int n) {
    int l = k / n;
    int c = k % n;
    boolean flag = false;
    if (0 == l || m - 1 == l)
      flag = true;
    if (0 == c || n - 1 == c)
      flag = true;
    return flag;
  }

  private static boolean onTheTable(int line, int col, int m, int n) {
    return (0 <= line && line < m) && (0 <= col && col < n);
  }

  private static void writeSolution(List<Integer> x, int T[][], int n,
      PrintStream out) {
    for (int i = 0; i < x.size(); i++) {
      out.print('(');
      out.print(x.get(i) / n + 1);
      out.print(", ");
      out.print(x.get(i) % n + 1);
      out.print(") ");
    }
    out.println();
  }

  private static void back(List<Integer> x, int T[][], int m, int n,
      PrintStream out) {
    int k = x.size() - 1;
    int xk = x.get(k);
    if (onTheBorder(xk, m, n)) {
      writeSolution(x, T, n, out);
      return;
    }
    int l = xk / n;
    int c = xk % n;
    int lnew, cnew, dx, dy;
    for (dx = -1; dx < 2; dx++)
      for (dy = -1; dy < 2; dy++)
        if (1 == Math.abs(dx + dy)) {
          lnew = l + dx;
          cnew = c + dy;
          if (onTheTable(lnew, cnew, m, n) && T[lnew][cnew] < T[l][c]) {
            x.add(lnew * n + cnew);
            back(x, T, m, n, out);
            x.remove(x.size() - 1);
          }
        }
  }

  public static void main(String[] args) throws IOException {
    Scanner sc = null;
    PrintStream out = null;
    try {
      out = new PrintStream(new File(FileOutputName));
      sc = new Scanner(new File(FileInputName));
      int m = sc.nextInt();
      int n = sc.nextInt();
      int[][] t = new int[m][n];

      for (int i = 0; i < m; i++) {
        for (int j = 0; j < n; j++) {
          if (!sc.hasNextInt())
            return;
          t[i][j] = sc.nextInt();
        }
      }
      int l0 = sc.nextInt() - 1;
      int c0 = sc.nextInt() - 1;
      List<Integer> x = new ArrayList<Integer>();
      x.add(l0 * n + c0);
      back(x, t, m, n, out);
    } finally {
      if (sc != null) {
        sc.close();
      }
      if (out != null) {
        out.close();
      }
    }
  }
}

