#include <bits/stdc++.h>
using namespace std;
int n, m;
int main() {
  cin >> n >> m;
  for (int t = 1; t <= n / 2; ++t) {
    int b = n - t + 1;
    int lasttl = 0;
    int lastbr = m + 1;
    for (int i = 0; i < m; ++i) {
      cout << t << " " << ++lasttl << "\n";
      cout << b << " " << --lastbr << "\n";
    }
  }
  if (n % 2) {
    int x = n / 2 + 1, y;
    int lastl = 0, lastr = m + 1, d = -1;
    for (int i = 0; i < m; ++i, d = -d) {
      if (d > 0) {
        y = lastr - 1;
        lastr--;
      } else {
        y = lastl + 1;
        lastl++;
      }
      cout << x << " " << y << "\n";
    }
  }
  return 0;
}
