#include <bits/stdc++.h>
inline void read(int &x) {
  x = 0;
  int f = 1;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = (x << 3) + (x << 1) + (s ^ 48);
    s = getchar();
  }
  x *= f;
}
int main() {
  int n, m;
  read(n);
  read(m);
  for (register int i = 1; i <= n / 2; ++i) {
    for (register 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 (register int i = 1; i <= m / 2; ++i) {
      printf("%d %d\n", n / 2 + 1, i);
      printf("%d %d\n", n / 2 + 1, m - i + 1);
    }
    if (m & 1) printf("%d %d\n", n / 2 + 1, m / 2 + 1);
  }
  return 0;
}
