#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  int u, d, z;
  cin >> n >> m;
  u = 1;
  d = n;
  while (u <= d) {
    if (u == d)
      z = m / 2;
    else
      z = m;
    for (int i = 1; i <= z; i++) {
      printf("%d %d\n", u, i);
      printf("%d %d\n", d, m - i + 1);
    }
    if (u == d && z < m - z) printf("%d %d\n", u, m - z);
    u++;
    d--;
  }
  return 0;
}
