#include <bits/stdc++.h>
const int mod = 1e9 + 7;
using namespace std;
int main() {
  vector<pair<int, int>> v;
  int n, m;
  cin >> n >> m;
  for (int i = 1, j = n; i < j; i++, j--) {
    for (int k = 1; k <= m; k++)
      printf("%d %d\n", i, k), printf("%d %d\n", j, m - k + 1);
  }
  if (n & 1) {
    for (int k = 1; k < m - k + 1; k++)
      printf("%d %d\n", n / 2 + 1, k), printf("%d %d\n", n / 2 + 1, m - k + 1);
    if (m & 1) {
      printf("%d %d\n", n / 2 + 1, m / 2 + 1);
    }
  }
  return 0;
}
