#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int fr = 1, sr = n;
  while (fr < sr) {
    int fc = 1, sc = m;
    while (fc <= m) {
      printf("%d %d\n", fr, fc);
      printf("%d %d\n", sr, sc);
      fc++, sc--;
    }
    fr++, sr--;
  }
  if (fr != sr) return 0;
  int fc = 1, sc = m;
  while (fc < sc) {
    printf("%d %d\n", fr, fc);
    printf("%d %d\n", fr, sc);
    fc++, sc--;
  }
  if (fc == sc) printf("%d %d\n", fr, fc);
}
