#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, i, j, k, p;
  cin >> a >> b;
  if (a % 2 == 0) {
    for (i = 0; i < a / 2; i++) {
      for (j = 0; j < b; j++) {
        cout << i + 1 << " " << j + 1 << "\n";
        cout << a - i << " " << b - j << "\n";
      }
    }
  } else {
    for (i = 0; i < a / 2; i++) {
      for (j = 0; j < b; j++) {
        cout << i + 1 << " " << j + 1 << "\n";
        cout << a - i << " " << b - j << "\n";
      }
    }
    long long int centre = a / 2 + 1;
    if (b % 2 == 0) {
      for (i = 0; i < b / 2; i++) {
        cout << centre << " " << i + 1 << "\n";
        cout << centre << " " << b - i << "\n";
      }
    } else {
      long long int centre2 = b / 2 + 1;
      for (i = 0; i < b / 2; i++) {
        cout << centre << " " << i + 1 << "\n";
        cout << centre << " " << b - i << "\n";
      }
      cout << centre << " " << centre2 << "\n";
    }
  }
}
