#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const double EPS = 1e-9;
int mods(int a, int b) { return (b + (a % b)) % b; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  bool turn;
  cin >> n >> m;
  int r1 = 1, c1, r2 = n, c2;
  while (r1 <= r2) {
    c1 = 1;
    c2 = m;
    turn = 0;
    while ((r1 == r2 && c1 <= c2) || (r1 != r2 && (c1 <= m || c2 >= 1))) {
      if (!turn) {
        cout << r1 << " " << c1 << '\n';
        c1++;
        turn = 1;
      } else {
        cout << r2 << " " << c2 << '\n';
        c2--;
        turn = 0;
      }
    }
    r1++;
    r2--;
  }
  return 0;
}
