#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int i = 1, j = 1, cnt = 0;
  while (cnt < (n * m + 1) / 2) {
    if (j > m) {
      i++;
      j = 1;
    }
    printf("%d %d\n", i, j);
    int t1 = n - i + 1, t2 = m - j + 1;
    if (i == t1 && j == t2)
      ;
    else {
      printf("%d %d\n", t1, t2);
    }
    j++;
    cnt++;
  }
}
