#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  scanf("%d %d", &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) {
    int x = n / 2 + 1;
    int left = 1, right = m;
    for (int i = 1; i <= m; i++) {
      if (i & 1)
        printf("%d %d\n", x, left++);
      else
        printf("%d %d\n", x, right--);
    }
  }
  return 0;
}
