#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, m;
  cin >> n >> m;
  for (int i = 1; i <= n / 2; i++) {
    for (int l = 1; l <= m; l++) {
      cout << i << " " << l << "\n";
      cout << n - i + 1 << " " << m - l + 1 << "\n";
    }
  }
  if (n % 2) {
    for (int i = 1; i <= m / 2; i++) {
      cout << (n + 1) / 2 << " " << i << "\n";
      cout << (n + 1) / 2 << " " << m - i + 1 << "\n";
    }
    if (m % 2) {
      cout << (n + 1) / 2 << " " << (m + 1) / 2 << endl;
    }
  }
  return 0;
}
