#include <bits/stdc++.h>
using namespace std;
int n, m, tx, ty = 0;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n / 2; ++i) {
    for (int j = 1; j <= m; ++j) {
      printf("%d %d\n", i, j);
      printf("%d %d\n", n - i + 1, m - j + 1);
    }
  }
  if (n & 1) {
    for (int i = 1; i <= m / 2; ++i) {
      printf("%d %d\n", (n + 1) / 2, i);
      printf("%d %d\n", (n + 1) / 2, m - i + 1);
    }
    if (m & 1) printf("%d %d\n", (n + 1) / 2, (m + 1) / 2);
  }
}
