#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  scanf("%d%d", &n, &m);
  for (int l = 1, r = n; l <= r; ++l, --r)
    if (l == r)
      for (int ll = 1, rr = m; ll <= rr; ++ll, --rr) {
        printf("%d %d\n", l, ll);
        if (ll < rr) printf("%d %d\n", l, rr);
      }
    else
      for (int i = 1; i <= m; ++i) printf("%d %d\n%d %d\n", l, i, r, m - i + 1);
  return 0;
}
