#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> v;
vector<pair<int, int>> d;
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i <= m / 2; i++) {
    int y1 = i + 1;
    int y2 = m - i;
    if (y2 < y1) break;
    for (int j = 0; j < n && (y1 != y2 || (y1 == y2 && j + 1 < n - j)); j++) {
      printf("%d %d\n", j + 1, y1);
      printf("%d %d\n", n - j, y2);
    }
  }
  if (m % 2 == 1 && n % 2 == 1) {
    v.emplace_back(n / 2 + 1, m / 2 + 1);
    printf("%d %d\n", n / 2 + 1, m / 2 + 1);
  }
  return 0;
}
